Skip to content
Michał Aleksiński edited this page Nov 16, 2022 · 22 revisions

Welcome to the intel-cmt-cat wiki!

Overview

This software package provides support for Intel(R) Resource Director Technology (RDT): Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM), Cache Allocation Technology (CAT), Code and Data Prioritization (CDP) and Memory Bandwidth Allocation (MBA).

Intel(R) RDT provides the hardware framework to monitor and manage shared CPU resources, like cache and memory bandwidth. An increase in the number of workloads running simultaneously on a system, increases pressure on shared CPU resources resulting in lower performance determinism. Intel(R) RDT technologies can monitor and control the allocation of key shared system resources to help improve determinism.

OS Support

Linux is the primary supported operating system at the moment. There is a FreeBSD port of the software but due to limited validation scope it is rather experimental at this stage. Although most modern Linux kernels include support for Intel(R) RDT (see table), the intel-cmt-cat software package predates these extensions and can operate with and without kernel support. The intel-cmt-cat software can detect and leverage these kernel extensions when available to add functionality, but is also compatible with legacy kernels.

OS Frameworks

Linux kernel support for Intel(R) RDT was originally introduced with Linux perf system call extensions for CMT and MBM. More recently, the Resctrl interface added support for CAT, CDP and MBA. On modern Linux kernels, it is advised to use the kernel/OS interface when available. Details about these interfaces can be found in resctrl_ui.txt. This software package, intel-cmt-cat, remains to work seamlessly in all Linux kernel versions.

intel-cmt-cat interfaces

The intel-cmt-cat software library and utilities offer two interfaces to program Intel(R) RDT technologies, these are the MSR & OS interfaces.

The MSR interface is used to configure the platform by programming the hardware (MSR's) directly. This is the legacy interface and requires no kernel support but is limited to monitoring and managing resources on a per core basis.

The OS interface was later added to the package and when selected, the library will leverage Linux kernel extensions to program these technologies. This allows monitoring and managing resources on a per core/process basis and should be used when available.

It is posible to configure the automatic interface detection ( AUTO interface). This option is default and sets one of the both above-mentioned interfaces. If automatic detection is selected and "RDT_IFACE" environment variable is set, then:

  1. If "RDT_IFACE" environment variable is set to "OS", then only auto or os interfaces is allowed. An error will be reported when trying to set up the msr interface. The library will use the os interface if is supported.
  2. If "RDT_IFACE" environment variable is set to "MSR", then only auto or msr interfaces is allowed. An error will be reported when trying to set up the os interface. The library will use the msr interface.
  3. If "RDT_IFACE" environment variable is set to different value, then error will be reported.

If "RDT_IFACE" environment variable is no set, then:

  1. When requested interface is auto and resctrl is supported, then os interface will be used.
  2. When requested interface is auto and resctrl is not supported, then msr interface will be used.

Please see the tables below for more information on when Intel(R) RDT feature (MSR & OS) support was added to the package.

MSR interface feature support:

intel-cmt-cat version RDT feature enabled Kernel version required
0.1.3 L3 CAT, CMT, MBM Any
0.1.4 L3 CDP Any
0.1.5 L2 CAT Any
1.2.0 MBA Any
2.0.0 L2 CDP Any

OS interface feature support:

intel-cmt-cat version RDT feature enabled Kernel version required Recommended interface
0.1.4 CMT (Perf) 4.1 MSR*
1.0.0 MBM (Perf) 4.7 MSR*
1.1.0 L3 CAT, L3 CDP, L2 CAT (Resctrl) 4.10 OS for allocation only (with the exception of MBA)
MSR for allocation + monitoring**
1.2.0 MBA (Resctrl) 4.12 OS for allocation only
MSR for allocation + monitoring**
2.0.0 CMT, MBM (Resctrl) 4.14 OS
2.0.0 L2 CDP 4.16 OS
3.0.0 MBA controller (Resctrl) 4.18 OS

*: Monitoring with Perf on a per core basis is not supported and returns invalid results.
**: The MSR and OS interfaces are not compatible. MSR interface is recommended if monitoring and/or allocation is to be used.

Software dependencies

The only dependencies of intel-cmt-cat is access to C and pthreads libraries and:

  • without kernel extensions - 'msr' kernel module*
  • with kernel extensions - Intel(R) RDT extended Perf system call and Resctrl filesystem

*: To load the module on Linux: sudo modprobe msr, to load the module on FreeBSD: sudo kldload cpuctl

Enabling Intel(R) RDT support in the Linux kernel (OS interface)

Intel(R) RDT kernel support can be enabled using kernel configuration options. For example:

  • enable kernel v4.10 - v4.13 with configuration option CONFIG_INTEL_RDT_A
  • enable kernel v4.14+ with configuration option CONFIG_INTEL_RDT
  • enable kernel v5.0+ with configuration option CONFIG_X86_CPU_RESCTRL
  • Note: no kernel configuration options required before v4.10.

Individual Intel(R) RDT features can be enabled/disabled by passing kernel command line parameters at boot.

For example, to turn on CMT and turn off MBA, add the following to your kernel command line: rdt=cmt,!mba

The full list of parameters is: cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, l2cdp, mba

For more information, visit our other wiki pages: