Investigation and Resolution of CPU Spike in Elasticsearch Cluster Caused by JIT Deoptimization
The team traced near‑100 % CPU spikes in an Elasticsearch cluster during stress tests to frequent JIT deoptimizations triggered by a switch‑based experiment routing logic, and resolved the issue by replacing the switch with a function map, which eliminated deoptimizations and stabilized CPU usage.
