Sepero / temp-throttle

A shell script for throttling system CPU frequency based on a desired maximum temperature
Other
243 stars 64 forks source link

Disable or Isolate CPU core to reduce temp #43

Closed latot closed 6 months ago

latot commented 2 years ago

Hi hi, I was doing some tests in a server, and I notice even with the actual method, is not possible to always keep the temp we want.

So, after collect data I notice the temp is also proportional to the number of cores we are using, so, I think would be great use CPU affinity to just lock a CPU core, and with that we can reduce the temp too.

I'm curios what would be the combination of cores enabled/frequency to get the best performance.

Thx.

latot commented 2 years ago

I found 2 ways to do this, one is:

echo 0 > /sys/devices/system/cpu/cpu3/online

This method have some... things: https://stackoverflow.com/questions/44907731/programmatically-disable-cpu-core

The other one:

cset shield --cpu 4

https://github.com/lpechacek/cpuset This project is old, and need a doc to explain how to run it..., is not as simple as run it.

Sepero commented 2 years ago

Thank you for your contribution. I will look into it. 👍🏻

Sepero commented 6 months ago

I will see about adding a cpu selection option to the next release.

gustrd commented 6 months ago

@Sepero, another idea that I think is good and that I'm using is disabling Intel's Turbo Boost before the first throttle down. It's responsible for a great part of the CPU's heat.

According to "https://github.com/georgewhewell/undervolt/blob/master/undervolt.py" it can be done with a simple:

with open("/sys/devices/system/cpu/intel_pstate/no_turbo","w+") as file: file.write(str(intelTurboState))