ChrisTitusTech / linutil

Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks.
https://christitus.com
MIT License
2.63k stars 217 forks source link

Enable and Disable SMT - Hyper-Threading on Debian #667

Closed 3aruin closed 3 weeks ago

3aruin commented 3 weeks ago

This feature request is not related to a problem? I'm always frustrated when Intel... NVM

Describe the solution you'd think could work

Adding a new sub folder of 'system-tweaks.sh' in system-setup This would be setup like browser-setup.sh with Turn on SMT & SMT off options

Feel this work act like Tweaks from "winutil" It seems that this Issue:Idea would be better held in tabs/utils rereading code in this tab

Describe alternatives you've considered

Not sure this applies to this idea

Additional context

Pulled from Eric Smith post on ServeTheHome.com

Discussions near Feature

Optimizations after OS install #439

Checklist

Notes from post

"A Guide to Quickly Enable and Disable SMT and Hyper-Threading on Ubuntu and Debian

One easy way if you do not want to script it is to use the good old smt control. You can use the following to see the state:

cat /sys/devices/system/cpu/smt/active

To turn SMT on, use:

echo on | sudo tee /sys/devices/system/cpu/smt/control

To turn SMT off, use:

echo off | sudo tee /sys/devices/system/cpu/smt/control

Turning on the SMT threads usually takes a few seconds, so you may need to wait a bit for the command to run. Also, you will need to use sudo to run this command since it is making a fairly substantial system change."

-This is may first GitHub action-

adamperkowski commented 3 weeks ago

This would conflict with power-profile.sh. While autocpufreq does not directly use SMT, it does take into account the number of available CPU cores and threads when making its decisions.

/close not planned

3aruin commented 3 weeks ago

Would a folder like 'Advanced Tweaks - Caution' be in the works

"This tool was developed to improve performance and battery life on laptops, but running it on desktops/servers (to lower power consumption) should also be possible." - auto-cpufreq

OR

2022-08-26 Video; Chis talks about changing core count for max battery

Could a manual* configuration be set after auto installation; in the apply_or_remove_auto_cpufreq this would also allow for setting of EPB intel_pstate driver at levels 0 = maximum performance to 15 = maximum power saving

OR

Is this tool, today, aimed at being user/novice friendly

Edit: https://github.com/konkor/cpufreq They note

A Few Reasons Why You Should Not Want To Use Single Core For Powersaving mode: Modern OS/kernel works better on multi-core architectures. You need at least 1 core for a foreground application and 1 for the background system services. Linux Kernel is changing CPU cores to avoid overheating, thermal throttle and to balance system loading. Many CPUs have enabled Hyper-Threading (HT) technology. So there is no big sense to run 0.5 physical CPU core.