Java: how to use a heap outside of 4 GB memory in a 32-bit JVM

We have a product that currently runs on the 32-bit version 1.6 JRE. We use Berkeley DB, which consumes about 2.5 GB of RAM and 4 GB of address space. This leaves us with about 750 MB of memory for the JVM address space.

We are currently facing OutOfMemory issues with the current setup. It would be nice to increase the JVM heap size to 1.5 GB, while preserving the 2.5 GB Berkeley DB space. Is there a way to access more than 4 GB of RAM / heap in a 32-bit JVM? I consider the following solutions
1) use a JVM that is better than GC - it will give me marginal results - I could get working memory of 50-100 MB

2) something like memcached or "outside the ehcache process" - it can get me as much allows hardware with IPC / serialization overhead.

Are there other solutions to increase the address memory of the application?

The solution should work on Solaris 10 running sparc.

* UPDATE: due to the use of our own shared libraries, right now we cannot switch to the 64-bit JVM, even if the OS is 64-bit *

Thank you,

+5
source share
3 answers

Are there other solutions to increase the address memory of the application?

  • Split one application in several processes with non-shared memory (not threads, but processes). The first process can start the database, and the second - the other part of the project. You can use RMI or shared memory or sockets to communicate between processes.
  • , . . x86-32 PAE 1 4 . (, " 4 /4 ", Oracle Linux)
  • . RAM- ; , , " ".

, SPARC ( SuperSparc LION) 64-. , 64- . Solaris, Linux 32- 64- . 64- 64- JVM.

: Solaris http://wikis.sun.com/display/BigAdmin/Talking+about+RAM+disks+in+the+Solaris+OS ramdisks, , ( ). /IPC, (1); / mmap/munmap. Ramdisk , SSD 3-4 , HDD.

+5

32- 4 . , .

2 ^ 32 = 4 294 967 296

64- JRE.

+3

I suggest you run 32-bit shared native libraries in a 32-bit JVM and run everything else in a 64-bit JVM. You can have a 64-bit JVM call to a 32-bit JVM to do whatever it does. I assume that the bulk of your data / memory requirement could be ported to a 64-bit JVM.

+3
source

All Articles