0

I have experienced some Minor GCs on Java CMS GC taking too much time. This generally occurs after some application's idle hours, and takes real time but not user nor cpu time.

I've seen that the machine has experienced some peak of memory usage due to other applications' activities, and I've seen that when the Minor GC takes long (about 10 secs) there is a high activity on swap area.

That said, I'm assuming that when the Minor GC occurs, the memory that are going to be analyzed, or at least portions of that, are probably in the swap area, therefore the Minor GCs take long.

I'd like to ask if I could do something to avoid this from happening, apart from avoiding machine to reach 100% of memory utilization, as it is not a thing that I can control.

javando
  • 139
  • 1
  • 1
  • 12
  • 2
    You can get the same problem even with programs written in a language without garbage collection, so I don’t think that there’s any solution based on GC options. Maybe, modern garbage collectors will touch less memory, so switching to a newer GC could reduce the problem, but it won’t disappear completely. – Holger Mar 30 '22 at 07:30
  • Actually we know nothing about your app - if it's www or "desktop" app, we don't know what's environment it works in, which java, etc... So it's difficult to help you. – Powiadam Cię Mar 31 '22 at 18:09

0 Answers0