Hi!
That's a huge heap, I'd guess that's the main reason for pauses. Do you
really need it so? Even though memory is cheap, the strategy "throw at
it all you've got" is bad for time constrained Java applications. You
need to choose the optimal heap size depending on the type of the
application, expected load, etc.
If you do something like in-memory data storage, I'd consider a way to
move it out of JVM and thus out of the general GC lifecycle.
> Also want to replace the ConcMarkSweepGC with the new G1 GC
> available in jdk 1.7. So it will be something like : -XX:+UseG1GC
> -XX:MaxGCPauseMillis=500 (to impose also a pause limit)
MaxGCPauseMillis is just a hint (it might not be possible to meet that
goal, e.g. due to a huge heap or due to the machine underperforming
for any other reason). And using ergonomics suggests to minimize other
"hand-tuning" as the more fixed values you set, the less space is left
for JVM self-tuning, which is the idea behind ergonomics and the usage
of hints like MaxGCPauseMillis.
> So, any advices?
From what I've gathered from various web resources is that the general
attitude towards modern JVM tuning is "less is more". :) That is, do
less hand tuning and leave more space for JVM self-tuning because it
has a lot more _actual_ data in runtime to do that, which would take a
lot of profiling for the developer to gather. And you'd need to redo
that over and over after any change in the behaviour of your system,
change on the shape of the load, etc.
--
Vilius Panevėžys
Elitnet