cmcfarlen commented on issue #14032: URL: https://github.com/apache/trafficserver/issues/14032#issuecomment-6780724069
Follow-up: instructions per cycle (IPC) for the same comparison. We reran the end points of the series on the same rig with `perf stat -e instructions,cycles` attached to the ATS process, user and kernel counted separately, over the loaded seconds of each leg. The aim was to see whether the gain comes from fewer instructions or from fewer stall cycles. Three builds: `master` @ `3767597`, the six PRs on top of it, and the six PRs + #13420. Cache mode is 3 legs per build, static is 2. Builds were run in turn within each round, every leg had 0 errors, and perf counted 100% of the time (no multiplexing). **Cache hits (1,024 URLs)** | | req/s | CPU µs/req | IPC | IPC user / kernel | K instructions/req | K cycles/req | |---|---:|---:|---:|---|---:|---:| | `master` | 955,886 | 34.40 | 0.68 | 0.70 / 0.50 | 61.9 | 91.3 | | six PRs | 1,278,516 (+33.8%) | 25.92 (−24.6%) | 0.94 (+39%) | 0.99 / 0.53 | 64.0 (+3%) | 67.6 (−26%) | | six PRs + #13420 | 1,326,281 (+38.7%) | 24.81 (−27.9%) | 0.92 (+36%) | 0.96 / 0.52 | 60.6 (−2%) | 65.8 (−28%) | **Static (generator plugin, cache bypassed)** | | req/s | CPU µs/req | IPC | IPC user / kernel | K instructions/req | K cycles/req | |---|---:|---:|---:|---|---:|---:| | `master` | 519,674 | 63.50 | 0.67 | 0.68 / 0.45 | 111.9 | 168.7 | | six PRs | 632,924 (+21.8%) | 52.14 (−17.9%) | 0.83 (+24%) | 0.86 / 0.45 | 112.7 (+1%) | 137.1 (−19%) | | six PRs + #13420 | 652,444 (+25.5%) | 49.94 (−21.4%) | 0.81 (+21%) | 0.84 / 0.46 | 107.4 (−4%) | 133.3 (−21%) | What this shows: - **The PRs don't make ATS do less work per request. They make it wait less.** Instructions per request are flat (+3% cache, +1% static), while cycles per request drop 26% and 19%. The whole gain is IPC, and it's in user space: 0.70 → 0.99 on cache hits. On `master`, about 30% of user cycles are stalls these changes remove, which fits the 65% drop in c2c HITMs above. - **Kernel IPC barely changes** (0.50 → 0.53 on cache hits, flat in static). kTLS and the network stack are a separate cost that these PRs don't touch. - **#13420 is the opposite kind of change:** on top of the six PRs it cuts instructions per request by about 5%, at slightly lower IPC. It removes work rather than stalls. - **Repeatability:** these legs reproduce the earlier session's numbers. The cache gain is +38.7% here vs ~+40% before, and CPU per request is within 1–2%. `perf stat` attached to the process cost about 1–1.5% throughput in on/off checks. That cost is the same for every build, so the comparison is unaffected. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
