Are there any conflicts between this extension and the power options that fedora already offers?
(at the moment in the power settings I have “balanced” selected, even though in the extension I set 2 threads on schedutil and the others on powersave)
What does it mean to disable cores? Does the extension physically cut off power to those shut down ?
Is it safe to disable some cores or do I risk to damage my cpu?
Receiving “power” (voltage actually) does not cause modern CPU designs to consume any significant “power” (watts). Having a massive number of internal states changing at high speed is what matters. Simply stopping it from executing instructions eliminates almost all of the power use. Blocking its main clock from reaching it more completely eliminates its power use.
I don’t know exactly how the ryzen 5 disables individual cores, but based on general principles, cutting off its power source would be a very messy solution, while cutting off its clock would be a very clean solution.
All of the above are designed in features of the CPU, not some strange action of the software that does it. All the software complexity is in the decisions of when/whether to cut off individual cores. How to cut them off was designed by the CPU designer and is safe (does not inherently risk damage to your CPU).
The same controls for cutting a core off may be usable in the opposite direction to run a core faster regardless of temperature and destroy your CPU by overheating. So in theory, some horrible bug in such software could destroy your CPU. That is especially unlikely, given the design of Linux (things like the extension you mentioned are not manipulating the actual hardware feature, merely making requests to simpler, well tested, code that can directly operate the hardware feature).
Thank you for your answer, I’m in the process of learning how to optimize the power efficiency of my cpu and your insights are really helpful. I’ve already tweaked a bit the parameters available in the bios using pbo (in particular using curve optimizer to reduce the voltage) and today I found this extension which enables to put some cores “offline” and to set the cpu governor individually.
At the moment I kept all my cores “online” and using the configuration wrote in my original post I observe that the temperature is 5/6 °C lower, so I assume that there aren’t major conflicts between this extension and Fedora power settings.
From the point of view of the performance I have to say that simple tasks (like surfing the internet or watching videos) are not affected, so I conclude that I my system is more efficient now, given the change of cpu temperature. Instead under load (even single threaded program) there is a significant loss of performance, anyway I can quickly change the governor if required… so at the moment I’m happy of my discovery
So far as I understand, simply reducing the voltage, without reducing the clock speed, is taking advantage of the variability in manufacturing of the chip.
At a lower voltage, there is a lower maximum clock rate at which the CPU functions correctly. Incorrect function of the CPU usually results in a program seg faulting, but can result in simple wrong answers in the program’s output. So it can be hard to test for.
The actual max clock rate for a given voltage will vary somewhat among chips of the exact same model. The manufacture selects a level of voltage for clock rate that is reliable across the entire line. You are improving on that tradeoff for your individual chip.
If I have all this right, simply lowering the voltage should not have an performance impact (should not reduce the speed of any computation). It reduces reliability, but maybe within a safe range.
Reducing clock rate (with or without also reducing voltage) reduces power use and speed, (if done correctly) without reducing reliability. Reducing voltage at the same clock speed reduces power use and reliability without reducing speed.
But as you noted, that “reliability” is not normally risk of harm to the CPU. It is risk of wrong answers or seq faults from your programs.