Does tuning the GC help? [duplicate]
Possible Duplicate:
Has anyone found Garbage Collection tuning to be useful?
Does it really help? Isn't the jvm written by much smarter people? What will be case to tune it manually?
The JVM is well written, but no universal GC policy exists for every situation. Check this:
http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html
Tuning garbage collection will help your application performance when garbage collection is the bottle neck for your application. You can use the JVM command line argument -verbose:gc
to help diagnose the issue.
For most applications, I would say that out of the box garbage collection should be sufficient. If you are having performance problems I would reevaluate your code.
Until dynamically ergonomic systems and instrumentation APIs exist (hello IBM & Oracle? you know my email, let's talk), the JVM is still limited as a machine to a set amount of size at startup. A 64 mebibyte heap won't work for a large JBoss application, and there's no reason to have an 8 gibibyte heap for a calculation.
Additionally, JVMs offer a few different GC schemes as to not have one-size-fits-all.
I tune all of my operational JVMs by analyzing the GC logs. You tune your Linux kernels yes?
精彩评论