I see GC output like below:
2010-12-10T16:00:44.942+0800: 1443.562: [GC 1443.562: [ParNew: 201856K->17318K(201856K), 0.0352970 secs] 2113334K->1949037K(4416748K) icms_dc=0 , 0.0354310 secs] [Times: user=0.12 sys=0.00, real=0.04 secs]
2010-12-10T16:00:46.207+0800: 1444.827: [GC 1444.827: [ParNew: 196774K->22400K(201856K), 0.0119290 secs] 2128493K->1954446K(4416748K) icms_dc=0 , 0.0120560 secs] [Times: user=0.13 sys=0.00, real=0.02 secs]
2010-12-10T16:00:47.562+0800: 1446.182: [GC 1446.182: [ParNew: 201856K->22400K(201856K), 0.0714350 secs] 2133902K->1982695K(4416748K) icms_dc=0 , 0.0715720 secs] [Times: user=0.23 sys=0.01, real=0.07 secs]
2010-12-10T16:00:48.545+0800: 1447.165: [GC 1447.165: [ParNew: 201856K->22400K(201856K), 0.1457230 secs] 2162151K->2008418K(4416748K) icms_dc=0 , 0.1458710 secs] [Times: user=0.71 sys=0.05, real=0.15 secs]
I want to know if ParNew GC will stop all threads. Thanks.
Jon Masamitsu's blog says so quite clearly
"ParNew" is a stop-the-world, copying
collector which uses multiple GC
threads.
In the example you've shown, the timings are reasonably quick though
Yes, ParNew is a "stop-the-world" collection which collects the young generation. Since the young generation is normally small in size, the collection should be very quick and shouldn't impact your application too much.
Yes, it is stop the world. In your example you will see the pause time inside the square brackets. It is usually the same as the real time. The user? time is the actual CPU time spent in GCing. It can be much larger than the real time when parallelity is used. In your case it looks like 4 GC threads.
Yes it stops, the world, though depending on your heap size and application, looks like you can use a larger newGen size. You are doing minor GC every minute. Larger newGen size does not necessarily mean that you will have a longer minor GC time. Though the benefit is that you will not promote objects that will soon die to the Old Gen. When the time comes for a full gc, you will have less objects to remove, and less downtime.