This appears to be a strange situation.
I am running a Java program that consumes quite some memory.
However, JVM "refuses" to expand its heap size. Here are the details of my system and symptoms.
1. Hardware and OS
Physical Memory: 7.7 GB
OS: Ubuntu 10.10 (Maverick)
Processor: AMD Phenom 9750 Quad Core
2. I did set memory args. for JVM. But they appear to be ineffective. Here is the command line to run my program
/usr/bin/java -Xms3000m -Xmx7000m -Djava.library.path=/usr/local/lib -d64 -XX:+UseCompressedOops -classpath /usr/local/lib/ExternalLib.jar:/usr/local/lib/commons-math-2.0.jar:myProgram.jar com.mydomain.analyzer.myLargeMemoryApp
I also changed -Xms and -Xmx to small values such as 7m.
However, regardless whatever memory arg values I used, the application started all right and expanded its memory footprint to about 2GB. Then it stop expanding. In the end, it reports error of heap running out of memory.
3. On a side note 1: my system can run program using memory more than 4GB. For example, in Eclipse.ini, after setting -Xmx5000m, eclipse memory footprint indeed grow more than 4GB if I load a large heap dump in eclipse.
4. On a side note 2: com.mydomain.analyzer.myLargeMemoryApp can run on a Ubuntu 9.10 and can expand its memory footprint more that 3GB.
5. My Java version
I tried two java versions to run com.mydomain.analyzer.myLargeMemoryApp
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
6. I am suspecting may be my shell/OS is limiting per-process size.
I type in ulimit in bash prompt and got a response of unlimited.
May be there are other settings I need to fiddle.
Anyway, I apparently hit a dead-end.
Thank you very much for your valuable input and help.