forked from intel/intel-cmt-cat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrdtset.8
205 lines (190 loc) · 6.92 KB
/
rdtset.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH RDTSET 8 "January 10, 2019"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
rtdset \- Task CPU affinity and Intel(R) Resource Director Technology/AMD PQoS control tool
.br
.SH SYNOPSIS
.B rdtset
.RI "-t <feature=value;...cpu=cpulist>... -c <cpulist> [-I] (-p <pidlist> | [-k] cmd [<args>...])"
.br
.B rdtset
.RI "-r <cpulist> -t <feature=value;...cpu=cpulist>... -c <cpulist> [-I] (-p <pidlist> | [-k] cmd [<args>...])"
.br
.B rdtset
.RI "-r <cpulist> -c <cpulist> (-p <pidlist> | [-k] cmd [<args>...])"
.br
.B rdtset
.RI "-r <cpulist> -t <feature=value;...cpu=cpulist>... [-I] -p <pidlist>"
.br
.B rdtset
.RI "-t <feature=value> -I [-c <cpulist>] (-p <pidlist> | [-k] cmd [<args>...])"
.SH DESCRIPTION
For more details on Intel(R) Resource Director Technology see
.br
.ss 0
http://www.intel.com/content/www/us/en/
architecture-and-technology/resource-director-technology.html
.ss 12
.br
or https://github.com/intel/intel-cmt-cat/wiki
.PP
The rdtset tool provides support to set up the CAT (Cache Allocation Technology) and MBA (Memory
Bandwidth Allocation) capabilities for a task and set its CPU affinity. For MBA, rdtset offers two modes of operation, fixed MBA rate
or closed-loop one monitoring local memory B/W usage and adjust MBA accordingly.
For OS interface, it uses MBA CTRL via libpqos (OS support available in Linux kernel 4.18 or later).
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 libpqos library. Class of service 0 (CLOS0)
is assumed as default one. In command mode, rdtset forks and one process executes the command. Another
process waits for the task to terminate and restores default allocation state by assigning cpu's back to CLOS0.
This behavior is not in place in PID mode.
.SH OPTIONS
rdtset options are as follow:
.TP
.B \-h, \-\-help
Show help
.TP
.B \-v, \-\-verbose
Verbose mode
.TP
.B \-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).
.TP
.B \-F <interface>, \-\-iface <interface>
Set the library interface to automatically detected one ('auto'), MSR ('msr') or kernel interface ('os').
.br
<interface> can be set to either 'auto' (default), 'msr' or 'os'.
.br
If automatic detection is selected ('auto'), it:
.br
1) Takes RDT_IFACE environment variable into account if this variable is set
.br
2) Selects OS interface if the kernel interface is supported
.br
3) Selects MSR interface otherwise
.TP
.B \-t\, \-\-rdt\ feature=value;...cpu=cpulist
Specify Intel(R) RDT configuration, single class configuration per -t, multiple -t options allowed.
.br
Accepted values for features:
.br
.B 2, l2 for level 2 cache
.br
.B 3, l3 for level 3 cache
.br
.B m, mba for MBA
.br
.B b, mba_max for max allowable local memory bandwidth
For example:
.B \-t\ 'l3=0xf;cpu=1'
.br
CPU 1 uses four L3 cache-ways (mask 0xf)
.B \-t\ 'l3=0xf;cpu=2' -t 'l3=0xf0;cpu=3,4,5'
.br
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
.B \-t\ 'l3=0xf;cpu=0-2' -t 'l3=0xf0;cpu=3,4,5'
.br
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
.B \-t\ 'l3=0xf,0xf0;cpu=1'
.br
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
.B \-t\ 'mba=70;cpu=0-2'
.br
CPUs 0-2 can utilize up to 70% of available memory bandwidth
.B \-t\ 'mba=50;l3=0xf;cpu=1'
.br
CPU 1 uses four L3 (mask 0xf) cache-ways and can utilize up to 50% of available memory bandwidth
.B \-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):
.B \-t\ 'l3=0xf'
.br
Allocate four L3 (mask 0xf) cache-ways to specified PIDs (-p option) or command
.B \-t\ 'l3=0xf;cpu=1;l3=0x1'
.br
CPU 1 uses four L3 (mask 0xf) cache-ways
.br
Specified PIDs (-p option) or command uses one L3 (mask 0x1) cache-way
.TP
.B \-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:
.BR 1-3,4,5 .
.TP
.B \-p <pidlist>, \-\-pid <pidlist>
Operate on existing PIDs
.TP
.B \-r <cpulist>, \-\-reset <cpulist>
Reset allocation for CPUs (assign COS#0 to listed CPUs)
.br
For example:
.B \-r 0-5
.br
Reset allocation for CPUs 0-5
.B \-r 0-5 \-t\ 'l3=0xf0;cpu=0-5' \-c 0-5 \-p $BASHPID
.br
Reconfigure allocation for CPUs 0-5
.br
In order to reconfigure allocation, it is needed to reset current configuration
.TP
.B \-k, \-\-sudokeep
Do not drop sudo elevated privileges
.SH NOTES
.PP
If kernel interface is not selected neither manually (e.g. --iface=msr)
nor automatically, 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:
.PP
Under Linux:
.br
sudo modprobe msr
.PP
Under FreeBSD:
.br
sudo kldload cpuctl
.PP
.PP
Interface enforcement:
.br
If you require system wide interface enforcement you can do so by setting the "RDT_IFACE" environment variable.
.PP
.PP
OS interface (--iface-os, -I)
.br
With --iface-os (-I) parameter, rdtset uses resctrl filesystem (/sys/fs/resctrl)
instead of accessing MSRs directly.
.SH SEE ALSO
.BR msr (4)
.SH AUTHOR
rdtset was written by Wojciech Andralojc <[email protected]>,
Tomasz Kantecki <[email protected]>, Michal Aleksinski <[email protected]>,
Marcel Cornu <[email protected]>
.P
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.