.TH "RAPL\-SET" "1" "2021-04-14" "powercap" "rapl\-set" .SH "NAME" .LP rapl\-set \- set RAPL configurations .SH "SYNPOSIS" .LP \fBrapl\-set\fP [\fIOPTION\fP]... .SH "DESCRIPTION" .LP This utility is deprecated, use .BR powercap\-set (1) instead. .LP Sets Intel Running Average Power Limit (RAPL) configurations. .LP Note that the \-p and \-z options are different from .BR powercap\-set (1). .LP This software requires an Intel processor (Sandy Bridge or newer), Linux kernel 3.13 or newer compiled with \fBCONFIG_POWERCAP\fR and \fBCONFIG_INTEL_RAPL\fR enabled, and the \fBintel_rapl\fR kernel module to be loaded. .SH "OPTIONS" .LP .TP \fB\-h,\fR \fB\-\-help\fR Prints out the help screen .TP \fB\-p,\fR \fB\-\-zone\fR=\fIZONE\fP The zone number (0 by default) .TP \fB\-p,\fR \fB\-\-package\fR=\fIPACKAGE\fP Deprecated, use \-\-zone instead .TP \fB\-z,\fR \fB\-\-subzone=\fR\fISUBZONE\fP The subzone number (none by default) .TP \fB\-c,\fR \fB\-\-constraint\fR=\fICONSTRAINT\fP The constraint number (none by default) .LP The following zone-level arguments may be used together (\-z/\-\-subzone is optional): .TP \fB\-j,\fR \fB\-\-z\-energy\fR Reset zone energy counter .TP \fB\-e,\fR \fB\-\-z\-enabled=1|0\fR Enable/disable a zone .LP The following constraint-level arguments may be used together and require \-c/\-\-constraint (\-z/\-\-subzone is optional): .TP \fB\-l,\fR \fB\-\-c\-power\-limit=UW\fR Set constraint power limit .TP \fB\-s,\fR \fB\-\-c\-time\-window=US\fR Set constraint time window .SH "EXAMPLES" .LP Note that \-p/\-\-zone=0 is used by default, allowing for simpler commands on single-socket systems. .TP \fBrapl\-set \-e 1\fP Enable zone 0 (implicitly), which is usually named \fBpackage\-0\fR. .TP \fBrapl\-set \-p 0 \-e 1\fP Enable zone 0 (explicitly). .TP \fBrapl\-set \-p 0 \-z 1 \-e 1\fP Enable zone 0, subzone 1, which is usually the \fBuncore\fR or \fBdram\fR subzone of \fBpackage\-0\fR, depending on the system. .TP \fBrapl\-set \-p 0 \-c 1 \-l 25000000\fP Set a power cap of 25 Watts (25000000 uW) on zone 0, constraint 1, which is usually the \fBshort_term\fR constraint for \fBpackage\-0\fR. .TP \fBrapl\-set \-p 1 \-z 0 \-c 0 \-l 15000000 \-s 976\fP Set a power cap of 15 Watts (15000000 uW) and time window of 976 microseconds on zone 1, subzone 0, constraint 0, which is usually the \fBlong_term\fR (and only) constraint for the \fBcore\fR subzone of \fBpackage\-1\fR (a multi-socket system). .SH "REMARKS" .LP Administrative (root) privileges are usually needed to use \fBrapl\-set\fR. .LP Setting constraint power cap and/or time limit values does not enable or disable a zone/subzone - the \-e/-\-z\-enabled flag must be set explicitly. .LP Power units: microwatts (uW) .br Time units: microseconds (us) .SH "BUGS" .LP The following are behavioral quirks due to the kernel interface or abnormalities in some hardware. They are not bugs in \fBrapl\-set\fR and should not be reported as such. .LP The kernel is not guaranteed to accept power limit and time window values exactly as specified. Values may be rounded due to how they are encoded in Model-Specific Registers. This rounding error is usually small within normal operating ranges, but can be significant at the extremes. .LP Some systems may not accept time window values correctly, requiring a system reboot to reset the time window to the default value. .LP Values returned by the kernel, e.g., by rapl\-info(1), sometimes lose accuracy from the actual stored value due to integer rounding. For example, the kernel may return a time window value of 7812 us, when in fact the actual stored value is 7812.5 us. Writing back an integer value returned by the kernel may cause unexpected changes to its stored value due to these rounding problems. .LP At the time of this writing, some features in the powercap interface are not supported by RAPL. Resetting a zone energy counter (\-j/\-\-z\-energy) may result in an EACCES (Permission denied) error due to the energy_uj file being read-only. .LP Some systems may not allow disabling package-level zones/constraints. .LP It is possible for packages on multi-socket systems to be indexed out of order by the kernel. For example, the package at index 0 (\fB\-p 0\fR) could actually be named \fBpackage\-1\fR while the package at index 1 (\fB\-p 1\fR) is named \fBpackage\-0\fR. If this matters to the user, it is their responsibility to check before setting values, e.g., using rapl\-info(1). .LP Report bugs upstream at .SH "FILES" .nf \fI/sys/devices/virtual/powercap/intel\-rapl/*\fP .nf \fI/sys/class/powercap/intel\-rapl/*\fP .fi .SH "AUTHORS" .nf Connor Imes .fi .SH "SEE ALSO" .BR powercap\-info (1), .BR powercap\-set (1), .BR rapl\-info (1)