set turbo boost off in performance if load/cpu usage is low
This commit is contained in:
parent
61f1115d63
commit
ff2f87ce6b
|
@ -208,9 +208,21 @@ def set_performance():
|
|||
print("\nTotal CPU usage:", cpuload, "%")
|
||||
print("Total system load:", load1m, "\n")
|
||||
|
||||
print("Setting turbo boost: on")
|
||||
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||
footer(79)
|
||||
# conditions for setting turbo in performance
|
||||
if load1m > 1:
|
||||
print("High load, setting turbo boost: on")
|
||||
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||
footer(79)
|
||||
elif cpuload > 20:
|
||||
print("High CPU load, setting turbo boost: on")
|
||||
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||
#print("\n" + "-" * 60 + "\n")
|
||||
footer(79)
|
||||
else:
|
||||
print("Load optimal, setting turbo boost: off")
|
||||
s.run("echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||
#print("\n" + "-" * 60 + "\n")
|
||||
footer(79)
|
||||
|
||||
# make turbo suggestions in performance
|
||||
def mon_performance():
|
||||
|
|
Loading…
Reference in New Issue