Thread (6 messages) flat view 6 messages, 5 authors, 2021-08-10

AW: hyperthreading and RT latency

From: Jonathan Schwender <hidden>
Date: 2021-08-10 05:10:51

Hi Alison,
Is the advice still current?   Should we RT-users all still turn hyperthreading off?
I ran some tests as a part of my master's thesis in the beginning of this year with the 5.10-rt kernel on an Intel Broadwell-EP 2-socket server.
If you are interested, I can dig up the graphs I made, but the jist regarding wake-up latencies measured by _cyclictest_ (24 hours each) is:
1. Task-isolation (placing the RT-task on a dedicated core) + Cache allocation + disabled Hyperthreading yields the best latencies. Something around 4-5us worst-case latencies were possibly with some optimizations.
2. Placing a load (rteval) together with cyclictest increases the latencies, but worst-case latencies of I think 16us are still okay for many applications
3. Isolating a task on a dedicated CPU and placing a load (rteval) on the neighbor CPU sharing the same core yields strictly worse latencies compared to 2). I think it was around 50us worst-case.
4. Isolating a task on a dedicated core (hyperthreading disabled), but enabling hyperthreading for the non-critical cores seems to have a rather small negative impact, as long as CAT is used to reserve cache for the isolated core. I'd have to look up the details though.

I don't think the situation has improved on more modern hardware, since AFAIK the SMT hardware has no knowledge of your tasks priority.
Thanks,
Alison Chaiken
Best Regards,

Jonathan Schwender
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help