UseParallelGC

hi,

i am using j2re1.4.2 for linux (redhat9.0).

i cannot seem to use the -XX:+UseParallelGC option. when i use it

the application starts to run, but is get stuck in the middle of a gc (after

completing a few garbage collection cycles).

i have tried to use -XX:+UseParallelGC in several ways, such as:

java -server -XX:+UseParallelGC

or

java -XX:+UseParallelGC

thanks in advance,

Harel

[458 byte] By [harel_paz] at [2007-9-30 18:12:28]
# 1

Hi

Which particular version of 1.4.2?

Any chance u can run pstack or its linux equivalent to get the native stack when it is stuck? Also, add -XX:+PrintGC -XX:+PrintGCDetails, usually, most applications can live with default collectors, use parallel GC only if u really want to tweak ur application performance.

Hope this helps.

cfuishien at 2007-7-6 18:44:30 > top of Java-index,Desktop,Runtime Environment...
# 2

Hi

>Which particular version of 1.4.2?

i have tried both the 4'th and the 5'th update of 1.4.2. i have also tried 1.5, and 1.4.1. in all versions- no luck.

this is what i get when running with -verbose:gc

[GC 54587K->46875K(498880K), 0.1512810 secs]

[GC 55771K->26131K(498880K), 0.0711950 secs]

[GC 56723K->49235K(499904K), 0.1079090 secs]

[GC 56787K->26195K(499904K), 0.1108160 secs]

[GC 58835K->50835K(500864K), 0.1187630 secs]

[GC 58963K->26355K(500864K), 0.0728150 secs]

[GC 60915K->51619K(501824K), 0.1301180 secs]

[GC

Suspended

>$ kill %2

>$ 60963K->26371K(501824K), 369.2696540 secs]

Timing Measurement began Fri Sep 24 12:01:05 IST 2004 for 2 minutes

>

as you can see it get stack in a middle of a GC. when i suspend it and then kill it, it first get out of the gc cycle and then dies.

>usually, most applications can live with default collectors, use parallel GC only if u really want to tweak ur >application performance.

the default collector works fine. however, since the application is multi-threaded, and my machine has 4 processors, i want to use parallel gc (to improve performance).

thanks,

Harel

harel_paz at 2007-7-6 18:44:31 > top of Java-index,Desktop,Runtime Environment...
# 3
i wonder if u got it solved? You can try another collector... -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
cfuishien at 2007-7-6 18:44:31 > top of Java-index,Desktop,Runtime Environment...