CPU time is the processor time consumed while a program handles work. It can serve as the optimization metric for a JIT-compiled web server: lower CPU time means faster request handling and less risk that waiting users abandon a page. section 6.1
Figure 6.1 The JIT compiles web server source code. The speed (conversely, CPU time) of the compiled web server depends on the parameters used to configure the JIT.
The diagram links JIT configuration to the execution speed—and therefore CPU time—of compiled server code. section 6.1
Measure CPU time offline by configuring the JIT, compiling the server, and replaying production request logs on production-equivalent hardware. A run returns average CPU time, but operating-system activity, caching, and other factors can make repeated measurements vary. Treat the compiler and server as a black box: supply parameters and use the observed metric without relying on internal dynamics. section 6.1 section 6.1.1
Use CPU time in an optimization loop:
- Start with an initial parameter setting, such as the center of the allowed range, and measure its CPU time. section 6.1.2
- Fit a response-surface surrogate that estimates CPU time and uncertainty between measured parameter values. section 6.1.3 section 6.2.1
- Choose another setting by balancing exploration of uncertain regions against exploitation of settings predicted to minimize CPU time. section 6.1.5
- Repeat design, measurement, and analysis until measured CPU time or the proposed parameters stop changing. section 6.4.2
Estimating CPU time between measurements
With measurements of 1.56 at parameter 0.5 and 1.21 at parameter 0.0, a simple estimate is their mean, 1.375. A distance-weighted estimate at 0.4 instead gives more influence to the nearby 0.5 measurement; one illustrated weighting yields 1.458. Gaussian process regression generalizes this interpolation into a surrogate used to select later experiments. section 6.2.1
Each server measurement may take about an hour, so optimization cost matters. In the seven-parameter example, repeated measurements take roughly two days; automation handles experiment design and analysis while the engineer supplies the measured CPU times. section 6.4.2



