Skip to main content

About ParallelOldGC

9 replies [Last post]
cytchiu
Offline
Joined: 2009-06-25
Points: 0

I am running a cluster JBoss servers.
Both server has 4 CPUs, dual cores. i.e. 8 logical CPUs.

I want to tune the JVM setting and I used the following parameters:

-XX:+UseParallelOldGC -XX:+ParallelGCThreads

I did some load test with different number of ParallelGCThreads.
However, I was surprised from the load test result that, the Full GC time for the UseParallelOldGC is much longer than I didn't use it. E.g.

A) Parallel Old GC = 7
4.1747870 secs

B) Parallel Old GC = 3
4.2135090 secs

C) No Parallel Old GC
2.7176180 secs

Does anyone know any reason why the ParallelOldGC can perform poor?

The JVM configure is as follows:

-Xms2560m -Xmx2560m -XX:NewSize=853m -XX:MaxNewSize=853m -XX:OldSize=1707m -XX:+UseParallelOldGC -XX:+ParallelGCThreads=7 -XX:PermSize=384m -XX:MaxPermSize=384m -Xloggc:/u01/app/jboss_sit/server/all/log/gc.log -Dsun.rmi.dgc.client.gcInterval=36
00000 -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:gc -XX:+PrintGC
TimeStamps -XX:+PrintGCDetails -XX:SoftRefLRUPolicyMSPerMB=0 -Djavax.net.ssl.sessionCacheSize=30

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cytchiu
Offline
Joined: 2009-06-25
Points: 0

By the way, my server is using JVM 1.5.17
So, I think I cannot use the option UseNUMA.

'the additional overhead of paralell collection only sums up negativly', can you further elborate on it?
Thank you very much!

cytchiu
Offline
Joined: 2009-06-25
Points: 0

How can I know if my server is memory bandwidth limited?

By the way, when I type numactl --hardware , the output is:

available: 1 nodes (0-0)
node 0 size: 8960MB
node 0 free: 23 MB

Does it mean that my server is running on NUMA?

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

> Does it mean that my server is running on NUMA?
Yes, and no.
Your machine supports NUMA commands, but you have only one numa region. NUMA regions only matter if you have more than one.

cytchiu
Offline
Joined: 2009-06-25
Points: 0

It is a linux server, 4CPUs, dual cores.

I heard someone said this may due to the lock contention problem, can anyone further elaborate on this issue?

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

On UNIX you can do
numactl --show
or
numactl --hardware

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

Let me ask you a question why would you replace an old GC is it performed so well?
Perhaps it is the old GC because it didn't perform in many cases.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Strange, maybe your machine is memory bandwidth limited anyway, so the additional overhead of paralell collection only sums up negativly.

Is this machine a NUMA one? There have been some NUMA enhancements to the paralell collector latly, try to use -XX:+UseNUMA . JonTheCollector has a nice blog article about it: http://blogs.sun.com/jonthecollector/

> Perhaps it is the old GC because it didn't perform in
> many cases.
It is the "old" GC, because its dedicated to collect the "old" generation, compared to e.g. ParNew.

- Clemens

cytchiu
Offline
Joined: 2009-06-25
Points: 0

How do I know if my server is NUMA?

smoov
Offline
Joined: 2007-05-01
Points: 0

You didn't say which OS or Java flavor you are using, but assuming HotSpot, the syntax for ParallelGCThreads is:

-XX:ParallelGCThreads=

As far as relative GC performance, assuming you are on Java 5 or newer, I'd recommend not setting new and old space sizes and let JVM ergonomics automatically manage those.

try something like this ( get good results with AggressiveOpts):
-server -XX:+AggressiveOpts -Xms2560m -Xmx2560m -XX:+UseParallelOldGC -XX:ParallelGCThreads=7 -XX:PermSize=384m -XX:MaxPermSize=384m -Xloggc:/u01/app/jboss_sit/server/all/log/gc.log -Dsun.rmi.dgc.client.gcInterval=36
00000 -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:gc -XX:+PrintGC
TimeStamps -XX:+PrintGCDetails -XX:SoftRefLRUPolicyMSPerMB=0 -Djavax.net.ssl.sessionCacheSize=30