Java non-heap keeps increasing in Kubernetes POD

726 Views Asked by At

I am using OpenJDK 11 to run a Spring Boot application. I have set the Xmx as 1G and min/max metaspace as 256M. I am runing this inside a kubernetes pod with memory limit as 2G. When the traffic to the pod increases I see OOMKill of pod and the pods restart. I dont see any OOM error in the logs. I enabled native tracking and below is the details of it. Is there some limit which I can apply to fix/tune the same. Will Increasing the MaxMetaspace help

Reserved(MB) committed(MB)
Total Allocated 2026.576 1765.548
Java Heap 1048.576 1048.576
Class 325.439 222.783
Thread 54.452 20.568
Code 258.915 134.427
GC 93.113 93.113
Compiler 1.814 1.814
Internal 6.045 6.045
Other 166.385 166.385
Symbol 35.661 35.661
Native Memory Tracking 15.311 15.311
Shared class space 17.012 17.012
Arena Chunk 0.179 0.179
0

There are 0 best solutions below