linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.51k stars 129 forks source link

Per-core processor settings #678

Open i-caused-y2k opened 1 year ago

i-caused-y2k commented 1 year ago

Is your feature request related to a problem? Please describe.

I use TLP to optimize the energy efficiency of VM host machines. Right now, the settings are applied across the entire topology of the CPU(s), so when it determines that "powersave" should be enabled, it does it on all cores.

This is generally fine, but I pin critical tasks like I/O to core 0, and therefore I'd like that core to run at a higher minimum state, to reduce latency.

Describe the solution you'd like

I'd like it if there were a way to omit specific cores from the processor settings (easier solution), or apply different settings for certain cores (more complex solution).

Describe alternatives you've considered

Is there the possibility run hook scripts at the events where TLP applies these changes, so I can run scripts override TLP's work on specific cores?

linrunner commented 1 year ago

Hi, I can imagine the simple solution with a cpu core blacklist.

The complex solution would mean that all core-related settings, i.e. CPUSCALING and CPUENERGY need to be extended analogously to DISK_*. Since cpus nowadays tend to have many cores/threads, the configuration file would become confusing for users. I want to avoid this.

Are you willing to contribute a pull request?