serg.nechaev
serg.nechaev

Reputation: 1321

100% old generation - is it an issue?

We are doing a load test of an application, and after some time AppDynamics reports "PS Old gen" at 100% in red. Full GC is running every 10 minutes. Memory's "Current Utilization" varies between 70-90%, it goes like this for hours and never fails with OOM.

I thought that once old gen utilization is above certain level, GC will try to free/compact old gen area and if nothing is freed it would either fail with OOM and start crazy full GC cycles just before it. However I don't see any of these. The application runs fine with 100% old gen utilization.

We are using Oracle Java 7u14 (64b, 4 cpu cores, 10gb RAM) and JVM is configured with

-XX:+UseParallelOldGC -Xmx4g

Thank you!

Upvotes: 1

Views: 5156

Answers (1)

Stephen C
Stephen C

Reputation: 718688

Whether this is an issue or not is really up to you to decide.

  • On the one hand, a full GC that runs for one second every 10 minutes is not a significant issue for throughput.

  • On the other hand, the full GC is probably going to dramatically reduce response times during that those one second windows. But that may not be important or even relevant to your application.

The thing I would be worried about is whether your load testing is a realistic test. The application appears to need 4Gb of heap space under test, but is it also going to need that in a real-world use? I'd be worried that a memory leak might show up when it is deployed into production. Or that the load in your load testing is causing the application's in-memory caching to reach a steady state in that won't be reproduced in production.

As a general rule, it is a bad thing for the heap to be running close to full, so an increase in the heap is probably advisable. Your application's performance doesn't appear to be suffering, but you could be "on the cusp".


I thought that once old gen utilization is above certain level, GC will try to free/compact old gen area and if nothing is freed it would either fail with OOM and start crazy full GC cycles just before it.

I suspect that the monitoring reports might be misleading you. If the full GC cycles were really not reclaiming anything, I'd expect the behaviour to be different.

Try turning on JVM GC log message, and see what they tell you about the amount of memory that the full GC cycles are managing to reclaim.

Upvotes: 1

Related Questions