RDTSET(8)
๐ RDTSET(8) โ the rdtset girlies' guide ๐
okay bestie, buckle up, this is rdtset from section 8 of the System Manager's Manual, and she is that girl. CPU affinity + Intel(R) RDT + AMD PQoS control. no cap. ๐
๐ธ NAME ๐ธ
rtdset โ task CPU affinity and Intel(R) Resource Director Technology/AMD PQoS control tool ๐
wait. hold on. it's rdtset. not rtdset. i literally just did that. ignore me. it's rdtset. periodt. ๐ญ
โจ SYNOPSIS โจ
rdtset -t <feature=value;...cpu=cpulist>... -c <cpulist> [-I] (-p
<pidlist> | [-k] cmd [<args>...])
rdtset -r <cpulist> -t <feature=value;...cpu=cpulist>... -c <cpulist>
[-I] (-p <pidlist> | [-k] cmd [<args>...])
rdtset -r <cpulist> -c <cpulist> (-p <pidlist> | [-k] cmd [<args>...])
rdtset -r <cpulist> -t <feature=value;...cpu=cpulist>... [-I] -p
<pidlist>
rdtset -t <feature=value> -I [-c <cpulist>] (-p <pidlist> | [-k] cmd
[<args>...])
like. five whole ways to call her. she's flexible, she contains multitudes. ๐ฆ
๐ DESCRIPTION ๐
so if you want the deep lore on Intel(R) Resource Director Technology, the sources are:
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
or
https://github.com/intel/intel-cmt-cat/wiki
go read them. they're giving encyclopedia. i respect it. ๐
okay so what does rdtset actually do. she provides support to set up the CAT (Cache Allocation Technology), MBA (Memory Bandwidth Allocation) and SMBA (Slow Memory Bandwidth Allocation) capabilities for a task โ and also sets its CPU affinity. three icons in one command, we love a multitasker. ๐
for MBA, rdtset offers two modes of operation: a fixed MBA rate, or a closed-loop one that monitors local memory B/W usage and adjusts MBA accordingly. pick your fighter.
for the OS interface, she uses MBA CTRL via libpqos โ and OS support for that is available in Linux kernel 4.18 or later, so check your kernel bestie. for MSRs, the tool adjusts MBA configuration by itself based on local memory B/W. Intel(R) RDT/AMD PQoS allocation operations of the utility are done via the libpqos library.
Class of service 0 (CLOS0) is assumed as the default one. default queen behavior honestly.
in command mode, rdtset forks and one process executes the command. another process waits for the task to terminate and restores the default allocation state by assigning cpu's back to CLOS0. so she cleans up after herself, which is more than some people do. ๐
โ ๏ธ this behavior is not in place in PID mode. noted. don't come for me later.
๐ OPTIONS ๐
rdtset options are as follow:
-h,--helpโ show help. the classic. she's here for you. ๐ซถ-v,--verboseโ verbose mode. she will tell you everything. oversharing era. ๐ฌ-I,--iface-osโ set the library to use the kernel implementation. if not set, the default implementation is to detect the interface automatically (MSR or kernel).-F <interface>,--iface <interface>โ set the library interface to automatically detected one ('auto'), MSR ('msr') or kernel interface ('os').<interface>can be set to either'auto'(default),'msr'or'os'. If automatic detection is selected ('auto'), it:- Takes
RDT_IFACEenvironment variable into account if this variable is set - Selects OS interface if the kernel interface is supported
- Selects MSR interface otherwise
- Takes
-t--rdtfeature=value;...cpu=cpulistโ specify Intel(R) RDT configuration, single class configuration per-t, multiple-toptions allowed. Accepted values for features:2,l2for level 2 cache3,l3for level 3 cachem,mbafor MBAs,smbafor SMBAb,mba_maxfor max allowable local memory bandwidth
For example:
-t 'l3=0xf;cpu=1'
CPU 1 uses four L3 cache-ways (mask 0xf)
-t 'l3=0xf;cpu=2' -t 'l3=0xf0;cpu=3,4,5'
CPU 2 uses four L3 cache-ways (mask 0xf), CPUs 3-5 share four L3 cache-ways (mask 0xf0), L3 cache-ways used by CPU 2 and 3-5 are non-overlapping
-t 'l3=0xf;cpu=0-2' -t 'l3=0xf0;cpu=3,4,5'
CPUs 0-2 share four L3 cache-ways (mask 0xf), CPUs 3-5 share four L3 cache-ways (mask 0xf0), L3 cache-ways used by CPUs 0-2 and 3-5 are non-overlapping
-t 'l3=0xf,0xf0;cpu=1'
On CDP enabled system, CPU 1 uses four cache-ways for code (mask 0xf) and four cache-ways for data (mask 0xf0), data and code cache-ways are non-overlapping
-t 'mba=70;cpu=0-2'
CPUs 0-2 can utilize up to 70% of available memory bandwidth
-t 'smba=64;cpu=0-2'
CPUs 0-2 can utilize up to 64 units of available slow memory bandwidth
-t 'mba=50;l3=0xf;cpu=1'
CPU 1 uses four L3 (mask 0xf) cache-ways and can utilize up to 50% of available memory bandwidth
-t 'mba_max=2000;cpu=1-2'
Use SW controller to limit local memory B/W on cores 1-2 to 2000MBps (SW controller uses MBL monitoring and adjust MBA rate).
Example PID type allocation configuration (requires -I option):
-t 'l3=0xf'
Allocate four L3 (mask 0xf) cache-ways to specified PIDs (-p option) or command
-t 'l3=0xf;cpu=1;l3=0x1'
CPU 1 uses four L3 (mask 0xf) cache-ways Specified PIDs (-p option) or command uses one L3 (mask 0x1) cache-way
-c <cpulist>,--cpu <cpulist>โ specify CPU affinity configuration, a numerical list of processors. the numbers are separated by commas and may include ranges. for example:1-3,4,5. ๐งฎ-p <pidlist>,--pid <pidlist>โ operate on existing PIDs. yes, plural. she can hold several at once. ๐-r <cpulist>,--reset <cpulist>โ reset allocation for CPUs (assign COS#0 to listed CPUs). For example:
-r 0-5
Reset allocation for CPUs 0-5
-r 0-5 -t 'l3=0xf0;cpu=0-5' -c 0-5 -p $BASHPID
Reconfigure allocation for CPUs 0-5 In order to reconfigure allocation, it is needed to reset current configuration
-k,--sudokeepโ do not drop sudo elevated privileges. she keeps the power. ๐
๐ฆ NOTES ๐ฆ
if the kernel interface is not selected โ neither manually (e.g. --iface=msr) nor automatically โ then CAT and MBA are configured using Model Specific Registers (MSRs) to set up the class of service masks and manage the association of the cores/logical threads to a class of service.
the rdtset software executes in user space, and access to the MSRs is obtained through a standard Linux*/FreeBSD* interface. under Linux, the virtual file system structure /dev/cpu/CPUNUM/msr provides an interface to read and write the MSRs; under FreeBSD it is /dev/cpuctlCPUNUM. the msr/cpuctl file interface is protected and requires root privileges. ๐
โ ๏ธ the msr/cpuctl driver might not be auto-loaded, and on some modular kernels the driver may need to be loaded manually:
Under Linux:
sudo modprobe msr
Under FreeBSD:
sudo kldload cpuctl
Interface enforcement:
If you require system wide interface enforcement you can do so by setting the "RDT_IFACE" environment variable. ๐ซก
๐ OS interface (--iface-os, -I)
With --iface-os (-I) parameter, rdtset uses resctrl filesystem (/sys/fs/resctrl) instead of accessing MSRs directly. it's giving "we don't do manual labor here." โจ
๐ซ SEE ALSO ๐ซ
๐ AUTHOR ๐
rdtset was written by Wojciech Andralojc <wojciechx.andralojc@intel.com>, Tomasz Kantecki <tomasz.kantecki@intel.com>, Michal Aleksinski <michalx.aleksinski@intel.com>, Marcel Cornu <marcel.d.cornu@intel.com>
absolute legends, every single one. ๐ซถ
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
๐ read that again bestie. no warranty. not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. she said what she said.
and that's the whole page, fr fr. this beauty is from the System Manager's Manual, and she was last updated January 10, 2019. still iconic. still serving. mwah. ๐๐๐
๐ฆ where this page comes from
- centos-stream 10: intel-cmt-cat 26.03-2.el10 ยท BSD-3-Clause
- centos-stream 9: intel-cmt-cat 26.03-1.el9 ยท BSD-3-Clause
- centos-stream 9: intel-cmt-cat 26.03-1.el9 ยท BSD-3-Clause
- debian trixie: intel-cmt-cat 25.04-1 ยท BSD-3-Clause
- fedora 43: intel-cmt-cat 25.04-3.fc43 ยท BSD-3-Clause
- fedora 43: intel-cmt-cat 26.03-1.fc43 ยท BSD-3-Clause
- fedora 44: intel-cmt-cat 25.04-4.fc44 ยท BSD-3-Clause
- fedora 44: intel-cmt-cat 26.03-1.fc44 ยท BSD-3-Clause
- nixos 26.05: intel-cmt-cat 26.03
- opensuse-leap 16.0: intel-cmt-cat 24.05.17.git+f1325a9-160000.2.2 ยท BSD-3-Clause
- ubuntu questing: intel-cmt-cat 25.04-1
- ubuntu resolute: intel-cmt-cat 25.04-5 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms