advice on tuning JVM
Peter B. Kessler
Peter.Kessler at Sun.COM
Wed Mar 5 09:56:38 PST 2008
Shaffer, Kurt wrote:
> 4 cpus (Ultra Sparc III 900MHz) / 8GB memory
> java version "1.4.2_13"
> ... -XX:+UseParallelGC -XX:ParallelGCThreads=20 ...
> Application is PTC Windchill
> We have seen very slow response times from the users standpoint, when they login it takes up to 15 seconds to render the display, when they are navigating through different views in their browser it can take 40 seconds or longer to display pages.
Try turning the number of ParallelGCThreads down to match the number
of CPU's on your box. On a 4-cpu box I would start out with
-XX:ParallelGCThreads=4, but if I saw a large variance in the times
for minor collections, I might try -XX:ParallelGCThreads=3 to leave
one CPU for running other things while the JVM was collecting. If
you typically run more than one such JVM on the box, you might consider
-XX:ParallelGCThreads=2 to be polite.
Note that in 1.4.2_13 only the minor (young generation) collections
are done on many processors; full collections are still serial
collections. If your logs show those collections to be the problem,
you might want to try the mostly-concurrent collector
(-XX:+UseConcMarkSweepGC) instead, but that will require different
But, as Jon said: mostly we need to see your logs to understand
what's not working. It would also help if you could say what kinds
of pauses you think are too long. Clearly 15 or 40 second pauses
are unacceptable for interactive applications, but, for example,
would occasional 1 or 2 seconds pauses be acceptable?
hotspot-gc-use mailing list
hotspot-gc-use at openjdk.java.net
More information about the hotspot-gc-dev