Hacker News new | ask | show | jobs
by jeffbee 1664 days ago
In the context of the article, if you are trying to keep foreign processes "off my cores" then you can't neglect to keep them off the adjacent hyperthreads, because those share some of the resources. If you have 8 threads on 4 cores then at least the way Linux counts them cores 0 and 4 are sharing some caches and all backend execution resources. So if you have isolated core 0 but not core 4 you might as well have not done anything at all.
1 comments

This makes sense in general, because the caches are the most precious resource.

However, in my case the working set is small enough and the processes are top-priority so they probably stay in the L2 if not the L1. Also ... I want to keep using my desktop so I don't mind the intrusion of my interactive processes.

Hmm. Is there a way to check how much L1/L2/L3 a process is occupying?

> in my case the working set is small enough and the processes are top-priority so they probably stay in the L2 if not the L1.

Maybe! Maybe not. If it's top priority on core X but something else with a much better (or cache-unfriendly) dataset is on the hyperthread-sibling core then your high priority process can still have cache misses.

No, but it is possible on certain top-end Intel SKUs to partition the last-level caches such that they are effectively reserved to certain processes.
pqos?
Even RDT isn't going to give you insight into L1 occupancy.