cmcfarlen commented on issue #14032:
URL: 
https://github.com/apache/trafficserver/issues/14032#issuecomment-6806138423

   Follow-up: the same A/B at 8 and 16 event threads, to check whether the 
per-thread bookkeeping costs anything when there's less contention, and to 
separate thread count from socket count.
   
   Same rig, builds and workloads as above, with IPC capture on. Cache mode is 
3 legs per build, static is 2; builds were run in turn within each round, and 
every leg had 0 errors with every thread busy. The test host has two sockets 
with 16 cores each:
   
   - **8t / 16t**: net threads on cores 0–7 / 0–15, all on socket 0.
   - **16tx**: 16 net threads, cores 0–7 on socket 0 and 16–23 on socket 1.
   - **32t**: cores 0–31, both sockets (the earlier results).
   
   One placement detail: ATS binds `ET_NET i` to core i itself 
(`exec_thread.affinity` 3, via hwloc over the whole machine), so a cpuset or 
`taskset` on the process can't move its net threads. For 16tx, each net thread 
was re-pinned to its target core and that core's hyperthread sibling right 
after startup, before the load generator's warmup ended.
   
   **Six PRs vs `master`**
   
   | | 8t (1 socket) | 16t (1 socket) | 16tx (2 sockets) | 32t (2 sockets) |
   |---|---:|---:|---:|---:|
   | cache hits | +2.5% | +3.7% | **+18.3%** | **+33.8%** |
   | static | +4.6% | +3.6% | **+7.6–11.9%** | **+21.8%** |
   | six PRs + #13420, cache | +9.8% | +9.8% | +22.8% | +38.7% |
   
   **Cache-hit detail**
   
   | | `master` req/s | six PRs req/s | `master` IPC | six-PR IPC | six-PR 
instructions/req vs `master` |
   |---|---:|---:|---:|---:|---:|
   | 8t | 339,157 | 347,668 | 1.00 | 1.05 | +2.8% |
   | 16t | 664,675 | 688,999 | 0.97 | 1.04 | +3.3% |
   | 16tx | 555,207 | 656,897 | 0.81 | 0.98 | +2.4% |
   | 32t | 955,886 | 1,278,516 | 0.68 | 0.94 | +3.3% |
   
   Cache-hit req/s per thread: `master` 42.4K / 41.5K / 34.7K / 29.9K, six PRs 
43.5K / 43.1K / 41.1K / 40.0K (8t / 16t / 16tx / 32t).
   
   What this shows:
   
   - **No regression at low thread counts.** On a single socket the six PRs 
gain 2.5–4.6% in both modes, and every PR leg beat every `master` leg. They do 
execute 0–3% more instructions per request, and higher IPC more than pays for 
it.
   - **Most of `master`'s slowdown at 32 threads comes from the second 
socket.** At the same 16 threads, splitting the net threads across both sockets 
costs `master` 16.5% on cache hits (IPC 0.97 → 0.81) and 7.4% in static mode. 
Within one socket, `master` scales almost linearly.
   - **The six PRs remove most of that cross-socket penalty.** Across sockets 
they lose 4.7% on cache hits, so their gain grows from +3.7% on one socket to 
+18.3% on two, at the same thread count. Instructions per request stay flat: 
the gain is fewer cycles spent waiting on cache lines bouncing between sockets.
   - **#13420 adds 5–7% on top of the six PRs** at every thread count and 
placement, by cutting instructions per request about 5%.
   
   In short: on a single-socket machine, expect a few percent. On multi-socket 
hosts the gains are large and grow with thread count. The 16tx static range is 
from two rounds; the one where all three builds ran back to back gave +7.6%.
   


-- 
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]

Reply via email to