We have a J2EE application being deployed in the production environment on SAP's NetWeaver application server. The server machine on which the application is being deployed has 16GB RAM, with no other major application running on the same server. Even the NetWeaver application server is going to host our application alone.
We are trying to figure out what would be an ideal value for JVM max heap size for the application server. If we can have JVM max heap size in the range of 4 to 8 GB, we can enable multi threading in our application to process transactional data in parallel. But I came across a reference in one of the articles which said for max heap size beyond 2GB, the applications starts experiencing garbage collection pauses, as the garbage collector runs take much longer to complete.
Can anybody provide us with any inputs on this? Particularly, what's the maximum JVM heap size one can have, without having to suffer from any such issues as garbage collection pauses?
I don't have experience of using such large heaps, but it would seem a shame to constrain your application to use much less than the machine has available.
There are lots of different garbage collector configuration parameters available. There are a number of different garbage collectors available, and each one has settings to twiddle They let you trade off things total amount of GC time versus maximum pause time etc. I'd imagine that somewhere in the space of settings is one that would suit your application.
I suggest careful consultation of the documentation of your JVM's GC settings, and some experimentation.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
If you are using a 32 bit JVM, what you have read (max heap size ~ 2GB) is correct. It won't allow you to configure any higher value for heap. However, that is not the only parameter which can be tuned.
If you switch on the VERBOSEGC, and find that the number of minor garbage collections are higher than the major ones, adjusting the new to old generation ratio (to provide more space to the new generation objects) would bring down the frequency of garbage collections in the JVM.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus