Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OutOfMemory when minsize and maxsize are equal

677311Dec 26 2008 — edited Jan 7 2009
Our application has a very large max heap size (-Xmx24g). We do not specify a minimum heap size. When our application starts up (normal), our committed heap size is ~6gb with about 3.5gb of that actually in use. After the end of the day, we sometimes need to bounce our application to test config changes, etc. The application reads everything committed to the db during the day and the heap size after the start up process is about ~15gb committed, 12gb in use.

I've read that specifying the minimum size equal to the maximum size leads to better garbage collection performance. So recently I tried testing that out (-Xms24g -Xmx24g). However, during our application start up procedure (i.e. we never get through it), we get OutOfMemory errors. This is happening when the JVM is trying to resize hash maps (most of our in-memory usage are big hash maps). Trying many different settings, the only thing that seems to help is to set -XXheapParts to higher values (I think the default is 128 and I've had some success with 4096). But even then this setting just delays the OutOfMemory to further along in the start up process (I tried 8192 and 16k but we eventually always hit an out of memory error).

I switched over to Sun's JVM to see if they have the same problem and the application can start up fine with -Xms24g -Xmx24g. Now I'm not sure if the Sun's JVM settings are exactly the same as JRockit's but they should be close.

The JRockit's settings are:

-Xms24g -Xmx24g -Xns512m -XgcPrio:pausetime -XpauseTarget=400ms -XXaggressive -XlargePages -XXcallProfiling

Sun's JVM settings (for reference) are:

-Xms24g -Xmx24g -XX:+UseConcMarkSweepGC -XX:+UseLargePages -XX:MaxGCPauseMillis=400 -XX:+AggressiveOpts

Any ideas on what to look for/what to try to see if I can use -Xms24g? Does it really even matter with regards to gc pauses (should I not worry about it and just go with -Xmx24g)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2009
Added on Dec 26 2008
2 comments
2,875 views