Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ParNew gc will stop the world?

Tags:

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.

like image 549
user537555 Avatar asked Dec 10 '10 08:12

user537555


People also ask

Is ParNew stop the world?

ParNew GC (-XX:+UseParNewGC) is a "stop-the-world" multithreaded Garbage Collector. Mostly it is aimed to collect the young generation objects. Since the young generation is normally small in size, the ParNew does collection very fast and does not impact your application too much.

What is ParNew GC?

A GC process (ParNew) automatically runs when it becomes full which removes unused objects and moves all objects that have lived long enough to the Tenured generation, thereby freeing up space in the Young generation for more new objects. Typically objects in the Young generation are short lived and temporary.

How do I stop long GC pauses?

If your application's object creation rate is very high, then to keep up with it, the garbage collection rate will also be very high. A high garbage collection rate will increase the GC pause time as well. Thus, optimizing the application to create fewer objects is THE EFFECTIVE strategy to reduce long GC pauses.

What is full GC allocation failure?

A GC allocation failure means that the garbage collector could not move objects from young gen to old gen fast enough because it does not have enough memory in old gen. This can cause application slowness.


1 Answers

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

like image 53
JoseK Avatar answered Oct 23 '22 11:10

JoseK