4 ms·
This has probably nothing to do with GC tuning[1] or with Java's GC being slow (or any other GC), and most likely to do with either a bug in the program (a leak
by pron 11y ago
This has probably nothing to do with GC tuning[1] or with Java's GC being slow (or any other GC), and most likely to do with either a bug in the program (a leak) or a misunderstanding of how the program uses memory. It's not the "GC ruining your day", but the GC not being able to fix a bug in your program and/or cram a 5 GB RAM usage into a 4 GB heap.
[1]: Which is relevant if you're trying to turn a 100ms pause into a 15ms pause, or get rid of the 2sec pause you get once every few hours.
- kpil 11y agoThere is either a leak: The application keeps pointers to a lot of objects that are actually never going to be used. Or running out of memory: The application keeps pointers to objects that will be used later. Both problems are solvable, you remove the pointers or change the algorithm respectively. (If you simply can't add more memory.) The real hard problem is that the jvm takes a long time to report an OOM error. But it's not unique to java; Who have not seen servers that have become unresponsive in a low memory situation.