Manage CPU Governor on linux
- Debian 12+
- Ubuntu 22.04+
- Chef 15.3+
No dependencies defined
This cookbook is resource-based. Configure CPU behavior through resource properties rather than cookbook attributes or recipes.
- set: Default action.
- pid:
- cpu:
cpu_affinity 1234 do
cpu 0
endSet affinity to processor 0,1,2 for process nginx
cpu_affinity 'set affinity for nginx' do
pid '/var/run/nginx.pid'
cpu '0-2'
end- set: Default action.
- governor:
- cpus: Defaults to all detected CPUs.
- package_name: Defaults to
"cpufrequtils".
cpu_governor 'ondemand'Set the governor for a subset of CPUs
cpu_governor 'performance' do
cpus [0, 1]
endActions
- set: Default action.
Properties
- pid:
- priority:
Examples
cpu_nice 1234 do
priority 12
endcpu_nice 'set affinity for nginx' do
pid '/var/run/nginx.pid'
priority 19
endOriginal Maintainer:: Guilhem Lettron
License:: Apache v2.0
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.