ti-mo / ansible-lanparty

Collection of integrated Ansible roles used to run LAN events.
GNU General Public License v3.0
137 stars 12 forks source link

lp-base - Add CPU Governor control for baremetal machines. #19

Closed koenvdheuvel closed 7 years ago

koenvdheuvel commented 7 years ago

lp-base - Ignore errors for baremetal that does not have os-control enabled for cpu management

Added CPU governor control for baremetal hosts that have os-control enabled in the bios for cpu power management.

The default setting sets the governor to performance. This makes sure the processor always runs at the maximum non turbo frequency. This prevents having delays that are cause by switching to higher C-States / P-states (going up in frequency and power usage). This is mostly a issue in pre intel skylake architectures.

References:

ti-mo commented 7 years ago

I don't have hardware that can revoke power control from the OS, but /sys/devices/system/cpu/cpu* seems like it could be missing when it happens.

We should use https://packages.debian.org/jessie-backports/amd64/linux-cpupower, which is in backports.(so depends on #18, we need to enable backports first) It doesn't come with a unit file, but we can write that one ourselves, as enabling performance should be as simple as: cpupower frequency-set -g performance.

I can get this implemented and tested by the end of the week, but feel free to go ahead if you have the time (and hardware).

ti-mo commented 7 years ago

Fact gathering improved in 830399acdbd210885e75ceed2fc250be9d9d4e46 cpupower implemented in f89d9b2a4c8cf062774700a394fef7608818c695 and https://github.com/ti-mo/lanparty-packages/commit/0e679e1c659e086dc6cb15f6bb4de52f649c0c28 Backports introduced in https://github.com/ti-mo/ansible-lanparty/commit/c8de430497d478fda892411cef317071ef8b2150