The initial problem is that java application is docker was OOM-killed due to memory usage. So I started to use NMT to understand why the consumption is more then expected. JVM version is 1.8.0_212 with container support. docker is launched with next java options
JAVA_OPTS='-XX:+AlwaysPreTouch -Xmx128m -Xms128m -XX:MaxMetaspaceSize=150m -XX:ReservedCodeCacheSize=100m -XX:+UseStringDeduplication -XX:+PrintFlagsFinal -XshowSettings:vm -XX:NativeMemoryTracking=detail' ... -m="450m" --cpu-shares="256" docker-image
Native Memory Tracking:
Total: reserved=1464054KB +843KB, committed=344578KB +1359KB
...
- Class (reserved=1124594KB +19KB, committed=85066KB +275KB)
(classes #15631)
(malloc=2290KB +19KB #20081 +27)
(mmap: reserved=1122304KB, committed=82776KB +256KB)
...
All numbers are as expected. The only question is for Class field, as it shows reserved value of ~ 1GB, can it be somehow decreased?