summaryrefslogtreecommitdiffstats
path: root/schedutils/uclampset.1
blob: 2f20ef31aad840365619abe237e586cbbbd76843 (plain)
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
'\" t
.\"     Title: uclampset
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.15
.\"      Date: 2022-05-11
.\"    Manual: User Commands
.\"    Source: util-linux 2.38.1
.\"  Language: English
.\"
.TH "UCLAMPSET" "1" "2022-05-11" "util\-linux 2.38.1" "User Commands"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
uclampset \- manipulate the utilization clamping attributes of the system or a process
.SH "SYNOPSIS"
.sp
\fBuclampset\fP [options] [\fB\-m\fP \fIuclamp_min\fP] [\fB\-M\fP \fIuclamp_max] _command argument\fP
.sp
\fBuclampset\fP [options] [\fB\-m\fP \fIuclamp_min\fP] [\fB\-M\fP \fIuclamp_max\fP] \fB\-p\fP \fIPID\fP
.SH "DESCRIPTION"
.sp
\fBuclampset\fP sets or retrieves the utilization clamping attributes of an existing \fIPID\fP, or runs \fIcommand\fP with the given attributes.
.sp
Utilization clamping is a new feature added in v5.3. It gives a hint to the scheduler about the allowed range of utilization the task should be operating at.
.sp
The utilization of the task affects frequency selection and task placement. Only schedutil cpufreq governor understands handling util clamp hints at the time of writing. Consult your kernel docs for further info about other cpufreq governors support.
.sp
If you\(cqre running on asymmetric heterogeneous system like Arm\(cqs big.LITTLE. Utilization clamping can help bias task placement. If the task is boosted such that \fIutil_min\fP value is higher than the little cores\(aq capacity, then the scheduler will do its best to place it on a big core.
.sp
Similarly, if \fIutil_max\fP is smaller than or equal the capacity of the little cores, then the scheduler can still choose to place it there even if the actual utilization of the task is at max.
.sp
Setting a task\(cqs \fIuclamp_min\fP to a none zero value will effectively boost the task as when it runs it\(cqll always start from this utilization value.
.sp
By setting a task\(cqs \fIuclamp_max\fP below 1024, this will effectively cap the task as when it runs it\(cqll never be able to go above this utilization value.
.sp
The full utilization range is: [0:1024]. The special value \-1 is used to reset to system\(cqs default.
.SH "OPTIONS"
.sp
\fB\-m\fP
.RS 4
Set \fIutil_min\fP value.
.RE
.sp
\fB\-M\fP
.RS 4
Set \fIutil_max\fP value.
.RE
.sp
\fB\-a\fP, \fB\-\-all\-tasks\fP
.RS 4
Set or retrieve the utilization clamping attributes of all the tasks (threads) for a given PID.
.RE
.sp
\fB\-p\fP, \fB\-\-pid\fP
.RS 4
Operate on an existing PID and do not launch a new task.
.RE
.sp
\fB\-s\fP, \fB\-\-system\fP
.RS 4
Set or retrieve the system\-wide utilization clamping attributes.
.RE
.sp
\fB\-R\fP, \fB\-\-reset\-on\-fork\fP
.RS 4
Set \fBSCHED_FLAG_RESET_ON_FORK\fP flag.
.RE
.sp
\fB\-v\fP, \fB\-\-verbose\fP
.RS 4
Show status information.
.RE
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
Display help text and exit.
.RE
.sp
\fB\-V\fP, \fB\-\-version\fP
.RS 4
Print version and exit.
.RE
.SH "USAGE"
.sp
The default behavior is to run a new command:
.RS 4
\fBuclampset\fP \fI[\-m uclamp_min]\fP \fI[\-M uclamp_max]\fP \fIcommand\fP [\fIarguments\fP]
.RE
.sp
You can also retrieve the utilization clamping attributes of an existing task:
.RS 4
\fBuclampset \-p\fP \fIPID\fP
.RE
.sp
Or set them:
.RS 4
\fBuclampset \-p\fP \fIPID\fP \fI[\-m uclamp_min]\fP \fI[\-M uclamp_max]\fP
.RE
.sp
Or control the system\-wide attributes:
.RS 4
\fBuclampset \-s\fP \fI[\-m uclamp_min]\fP \fI[\-M uclamp_max]\fP
.RE
.SH "PERMISSIONS"
.sp
A user must possess \fBCAP_SYS_NICE\fP to change the scheduling attributes of a process. Any user can retrieve the scheduling information.
.SH "NOTES"
.sp
The system wide utilization clamp attributes are there to control the \fIallowed\fP range the tasks can use. By default both \fIuclamp_min\fP and \fIuclamp_max\fP are set to 1024. This means users can set the utilization clamp values for their task across the full range [0:1024].
.sp
For example:
.RS 4
\fBuclampset \-s\fP \f(CR\-m 512\fP \f(CR\-M 700\fP
.RE
.sp
will prevent any task from being boosted higher than 512. And all tasks in the systems are capped to a utilization of 700. Effectively rendering the maximum performance of the system to 700.
.sp
Consult your kernel docs for the exact expected behavior on that kernel.
.SH "AUTHORS"
.sp
.MTO "qais.yousef\(atarm.com" "Qais Yousef" ""
.SH "SEE ALSO"
.sp
\fBnice\fP(1),
\fBrenice\fP(1),
\fBtaskset\fP(1),
\fBsched\fP(7)
.sp
See \fBsched_setscheduler\fP(2) and \fBsched_setattr\fP(2) for a description of the Linux scheduling scheme.
.SH "REPORTING BUGS"
.sp
For bug reports, use the issue tracker at \c
.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
.SH "AVAILABILITY"
.sp
The \fBuclampset\fP command is part of the util\-linux package which can be downloaded from \c
.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."