RAPL-SET(1)
π RAPL-SET π β bestie's guide to the rapl-set page (manual section 1)
okay so you opened rapl-set(1) and you're like "what is this". bestie. sit down. we're gonna read it together and it's gonna be fine. π
πΈ NAME πΈ
rapl-set β set RAPL configurations. that's the whole vibe. it sets stuff. RAPL stuff. iconic. β¨
π¦ SYNPOSIS π¦
rapl-set [OPTION]...
yeah that's it, that's the whole shape of it. options. many options. we'll get there. π«Ά
π DESCRIPTION π
β οΈ okay first thing first and I need you to actually hear me: this utility is deprecated. use powercap-set(1) instead. periodt. it still exists, it still works, but it's giving "we've moved on". π
so. this thing sets Intel Running Average Power Limit (RAPL) configurations. yes that's a real acronym. yes it's about power. no I will not be normal about it.
lowkey important detail: the -p and -z options here are different from the ones in powercap-set(1). like, don't assume they behave the same, they do not, that's a whole trap. π
and before you can even run this, the hardware/software vibe check has to pass:
- an Intel processor (Sandy Bridge or newer β she's picky π )
- Linux kernel 3.13 or newer, compiled with
CONFIG_POWERCAPandCONFIG_INTEL_RAPLenabled - the
intel_raplkernel module loaded
miss any of those and it's just not happening, bestie. π
β¨ OPTIONS β¨
here's the menu. every single one. no skips. π
-h,--helpβ prints out the help screen. the classic. the little "hi, here's how I work". π-p,--zone=ZONEβ the zone number. defaults to0. this is the one you want.-p,--package=PACKAGEβ deprecated, use--zoneinstead. yes, it's the same short flag as the one above. yes, that's on purpose. no, I don't make the rules. π-z,--subzone=SUBZONEβ the subzone number. default is none.-c,--constraint=CONSTRAINTβ the constraint number. default is none.
π zone-level arguments
these ones can be used together, and -z/--subzone is optional for them:
-j,--z-energyβ reset zone energy counter. fresh start energy. β¨-e,--z-enabled=1|0β enable/disable a zone.1for on,0for off. that simple.
π constraint-level arguments
these ones can also be used together, and they require -c/--constraint (-z/--subzone stays optional):
-l,--c-power-limit=UWβ set constraint power limit. units are microwatts, iykyk.-s,--c-time-window=USβ set constraint time window. units are microseconds.
π§ EXAMPLES π§
cute lil heads up before we start: -p/--zone=0 is the default, which means on single-socket systems your commands get to be short and adorable. π
rapl-set -e 1 enable zone 0 (implicitly, because she's the default), which is usually named package-0.
rapl-set -p 0 -e 1 enable zone 0, but explicitly this time. saying the quiet part out loud.
rapl-set -p 0 -z 1 -e 1 enable zone 0, subzone 1 β which is usually the uncore or dram subzone of package-0, depending on the system. your mileage may vary, check your system. π¦
rapl-set -p 0 -c 1 -l 25000000 set a power cap of 25 Watts (25000000 uW) on zone 0, constraint 1 β usually the short_term constraint for package-0.
rapl-set -p 1 -z 0 -c 0 -l 15000000 -s 976 set a power cap of 15 Watts (15000000 uW) and a time window of 976 microseconds on zone 1, subzone 0, constraint 0 β usually the long_term (and only) constraint for the core subzone of package-1, on a multi-socket system. look at her go. π
π REMARKS π
- administrative (root) privileges are usually needed to use
rapl-set. sorry babe, that's just how it is. π - setting constraint power cap and/or time limit values does not enable or disable a zone/subzone β you have to set the
-e/--z-enabledflag explicitly. this one trips people up constantly, don't let it be you. π - power units: microwatts (uW)
- time units: microseconds (us)
π BUGS π
okay so everything in this section is a behavioral quirk caused by the kernel interface or by some hardware being weird. these are not bugs in rapl-set and should not be reported as such. read that twice. then read it again. π«Ά
- the kernel is not guaranteed to accept power limit and time window values exactly as you specified them. values may get rounded because of how they're encoded in Model-Specific Registers. usually that rounding error is small when you're in normal operating ranges, but at the extremes it can be significant. π’
- some systems may not accept time window values correctly, and you'll need a system reboot to reset the time window to the default value. yeah. a reboot. π
- values the kernel returns β for example via
rapl-info(1)β sometimes lose accuracy compared to the actual stored value because of integer rounding. like, the kernel may return a time window value of7812us when the actual stored value is7812.5us. and if you write back an integer value that the kernel gave you, you may cause unexpected changes to its stored value thanks to these rounding problems. so. be careful. π¨ - at the time of this writing, some features in the powercap interface are not supported by RAPL. specifically: resetting a zone energy counter (
-j/--z-energy) may result in anEACCES(Permission denied) error, because theenergy_ujfile is read-only. π - some systems may not allow disabling package-level zones/constraints.
- on multi-socket systems, packages can be indexed out of order by the kernel. for real. the package at index 0 (
-p 0) could actually be namedpackage-1, while the package at index 1 (-p 1) is namedpackage-0. if that matters to you, it is your responsibility to check before setting values β e.g. usingrapl-info(1). main character energy means doing your own research. β¨
report bugs upstream at <https://github.com/powercap/powercap>
π FILES π
/sys/devices/virtual/powercap/intel-rapl/*
/sys/class/powercap/intel-rapl/*
those are the paths. she lives in /sys. that's just where power stuff hangs out. π
π AUTHORS π
Connor Imes <connor.k.imes@gmail.com> β thank you for your service, king. π
β SEE ALSO β
powercap-info(1), powercap-set(1), rapl-info(1)
go read those too, bestie, they're the friend group. π«Ά
and that's the whole page!! this one's from the powercap package, dated 2021-04-14, and it's rapl-set in manual section 1. ily, go set some power limits responsibly, drink water, and don't report kernel quirks as rapl-set bugs. mwah. πβ¨πΈ
π¦ where this page comes from
- debian bookworm: powercap-utils 0.6.0-1 Β· BSD-3-Clause
- debian trixie: powercap-utils 0.6.0-1+b2 Β· BSD-3-Clause
- nixos 26.05: powercap 0.6.0
- nixpkgs unstable: powercap 0.6.0
- opensuse-leap 16.0: powercap 0.6.0-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: powercap 0.6.0-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: powercap 0.6.0-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: powercap 0.6.0-bp160.1.12 Β· GPL-2.0-only
- ubuntu jammy: powercap-utils 0.5.0-1 Β· BSD-3-Clause
- ubuntu noble: powercap-utils 0.6.0-1 Β· BSD-3-Clause
- ubuntu questing: powercap-utils 0.6.0-1
- ubuntu resolute: powercap-utils 0.6.0-1build1 Β· BSD-3-Clause
- ubuntu stonking: powercap-utils 0.6.0-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms