I built a free JVM container memory calculator after a Netty pod kept getting OOMKilled

Wait 5 sec.

A while ago one of our Spring Cloud Gateway pods kept getting OOMKilled even though heap graphs looked fine. The culprit was direct memory: without -XX:MaxDirectMemorySize, the JVM lets direct buffers grow to roughly the size of the max heap, on top of the heap itself. So I made a small calculator for it: https://opshubs.space/tools/jvm-container-memory-calculator/ Enter the container limit and your JVM flags (MaxRAMPercentage or -Xmx, threads, metaspace, direct memory) It estimates the full footprint, shows a breakdown, and flags when you're likely to get OOMKilled It suggests MaxRAMPercentage / MaxDirectMemorySize values and a Kubernetes snippet It's plain HTML/JS, runs entirely in the browser, no sign-up. It's on my own blog. The GC overhead numbers are rough rules of thumb, so I'd love feedback from anyone who has real NMT numbers to compare against.   submitted by   /u/kkkevinkkkk [link]   [comments]