A just-in-time compiler translates code into machine code during execution. In a web server, its configuration affects the CPU time required to handle user requests, so compilation strategy becomes a production performance concern. section 6.1
Relevant parameters can control memory layout, the duration of interpreted monitoring before compilation, and inlining aggressiveness. The resulting behavior may be treated as a black box when internal compiler dynamics are unknown or unimportant. section 6.1 section 6.1.1
A practical tuning loop measures the compiled system rather than assuming parameter effects:
- Choose a set of JIT parameter values. section 6.1
- Configure the JIT and compile the web server code. section 6.1
- Replay production-logged requests on production-equivalent hardware and measure CPU time. section 6.1 section 6.1.1
- Repeat with suggested parameters until CPU time stops improving. section 6.1
A noisy JIT performance experiment
A simulator accepts seven parameter values between zero and one, computes an average CPU time, and adds random variation. The variation represents operating-system activity, cache fluctuations, and other measurement effects. Treating the simulator as a black box prevents the optimizer from relying on its internal formula. section 6.1.1
Figure 6.2 Bayesian optimization. After initialization at the center point, BO iterates through design, run, and analyze stages until the measured business metric stops changing. What makes BO so powerful is that the analyze and design stages are automated, freeing the engineer to devote more of their time to generating and implementing new ideas rather than to optimizing parameters.
The optimization loop alternates automated design, execution, and analysis until the measured business metric stops changing. section 6.1






