tumblr / genesis

A tool for data center automation
http://tumblr.github.io/genesis/
Apache License 2.0
155 stars 24 forks source link

Add task to disable CPU frequency scaling #68

Open michaeljs1990 opened 7 years ago

michaeljs1990 commented 7 years ago

This task puts all CPUs into performance mode so they report back the max MHz that they are capable of achieving.

Possibly a more elegant way to do this but I went for what required the least dependencies.

Closes #65

Before running

[root@genesis tasks]# cat /proc/cpuinfo | grep "cpu MH"
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971
cpu MHz     : 2526.971

After Running

[root@genesis tasks]# cat /proc/cpuinfo | grep "cpu MH"
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000
cpu MHz     : 2528.000

lshw also reports 2528 after this task is run.

byxorna commented 7 years ago

@roymarantz @defect bump to merge?