JAVA GC: ParNew (advance failure), parallel failure

I saw a sudden surge in application / platform memory usage. In the detailed GC logs I saw below:

1285.946: [GC 1285.946: [ ParNew (promotion failure) : 353920K-> 353920K (353920K), 0.8003983 sec] 1286.747: [CMS1287.338: [CMS-con current-sweep: 7.902 / 9.624 secs] [Times: user = 96.62 sys = 2.35, real = 9.62 s] ( failure in parallel mode ): 2531317K-> 1161025K (2752512K), 24.8330303 secs] 2860005K-> 1161025K (3106432K), [CMS Perm: 37117K-> 3 6905K (62368K )], 25.6341706 secs] [Times: user = 26.41 sys = 0.05, real = 25.63 secs] [POA RootPOA - rid: 17 oid: 00 17 2E 29 23 33 49 34 25 3E opname: ping - process request] 1312.367: [ GC 1312.367: [ParNew: 314624K-> 30240K (353920K), 0.0188874 sec.] 1475649K-> 1191266K (3106432K), 0.0194380 sec.] [Time s: user = 0.40 sys = 0.00, real = 0.02 s] 1313.249: [GC 1313.249: [ParNew: 344864K-> 39296K (353920K), 0.0300220 secs] 1505890K-> 1201198K (3106432K), 0.0305488 seconds]

ParNew (promotion failed), concurrency failure: explain how to resolve this. I believe that a sudden surge in memory is visible due to a GC crash.

Your comments are requested.

+4
source share
2 answers

From the visible lines, I would suggest that your application code creates too many garbage objects. Failure CMS Full GC was able to collect 1.4 GB of garbage. Thus, this is not a fragmentation problem, but the problem with the CMS does not catch up. [CMS perm] makes me find out what your GC settings are. Perhaps you could give the CMS more processors to run? Or you can increase the new space to avoid premature promotion to the old one.

But there is a chance that you are running inefficient code. I would attach a profiler to it and look at the hot spots for garbage.

+2
source

β€œParNew (promotion failed)” means that some objects from the young generation will be promoted to the old generation, but there is not enough space. Perhaps the old space is almost full, or perhaps the advanced object is too large and there is not enough space to continue.

A simple solution that is trying to increase the size of the old generation. Or you can try using the G1 algorithm, this can reduce the problem of a fragment of the old generation.

If both methods cannot solve your problem, you may need to look at your code to reduce the size of one object.

Only my 2 cents

Best regards, Leon

+13
source

Source: https://habr.com/ru/post/1433015/


All Articles