JVM Tuning in Containers
JVM Tuning in Containers
Environment
Inspiring Brilliance
Garbage Collection
● Mark
● Sweep
● Scavenge
● Compact
Commonly Faced Issues In Container Environment
t=5,filesize=100m)
● Prometheus metrics
○ jvm_gc_pause_seconds
○ jvm_gc_memory_allocated_bytes_total
○ jvm_gc_memory_promoted_bytes_total
Tune GC Settings If
● Long pause of GC
● Frequent Full GC
● Frequent OOM
GC Optimization Goals
● Application Throughput
● Latency
● Memory Footprint
JVM Ergonomics
● Behaviour Tuning
● Latency -XX:MaxGCPauseMillis - No default value
● Throughput -XX:GCTimeRatio 1 / (1 + GCTimeRatio) - Default 12 (8%)
● Footprint -Xmx
● Additional Tuning
○ -XX:MinHeapFreeRatio
○ -XX:MaxHeapFreeRatio
○ -XX:AdaptiveSizePolicyWeight
Garbage First (G1GC)
Garbage First (G1GC)
Contact