intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
693 stars 183 forks source link

What is the performance overhead when enable CMT or CAT? #195

Closed MikuGhoul closed 2 years ago

MikuGhoul commented 3 years ago

I want to know is there any overhead when monitoring LLC or adjusting LLC allocation? For example, I found when use resctrl interface monitoring task, linux kernel have to check if current task have the same RMID with previous task when trigger schedule every times. This is may not be ignored. So is it better to use per core monitoring than per task? Or maybe the overhead is negligible?

aegl commented 3 years ago

You are correct. If the scheduler switches from a task with one <CLOSID,RMID> pair to a new task where either/both are different, then it must use WRMSR instruction to update the IA32_PQR_ASSOC MSR. How much overhead this creates would be workload dependent. If you are context switching tens of thousands of times per second on a CPU where this update is needed it might be significant. You should measure to determine if this is significant for your workload.

If your workload allows, you might mitigate this using taskset(1) or sched_setaffinity(2) to bind tasks with different <CLOSID,RMID> value pairs to different groups of CPUs.

kmabbasi commented 2 years ago

Hi MikuGhoul,

We haven't heard back from you, considering this issue has been resolved.

Thanks, Khawar