Score:1

How to disable frequency boost and hyperthreading

kz flag

I'm trying to disable both hyperthreading and frequency boost to benchmark some code. Because I cant find anything about this on the BIOS, I ran lscpu to get some information about the CPU (AMD Ryzen 7 4700U) and I get this information

CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 7 4700U with Radeon Graphics
    CPU family:          23
    Model:               96
    Thread(s) per core:  1
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            1
    Frequency boost:     enabled
    CPU max MHz:         2000,0000
    CPU min MHz:         1400,0000

Because there is only 1 thread per core, I'm assuming my CPU does not support hyperthreading (I'm not sure about this).

To disable frequency boost, I have tried running this command, which as far as I understand should clock the CPU to the highest frequency

sudo cpupower frequency-set --governor performance

but when I run lscpu I still get

Frequency boost:     enabled

Does anyone know the correct way to disable both hyperthreading and frequency boost (without using the BIOS because I can't find anything about this there)

EDIT The CPU frequency scaling driver is

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu4/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu5/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu6/cpufreq/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpu7/cpufreq/scaling_driver:acpi-cpufreq
Doug Smythies avatar
gn flag
The answer might depend on which CPU frequency scaling driver you are using. Do: `grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver` and edit your answer to include the information. Yes, it seems you do not have hyperthreading.
j0h avatar
au flag
j0h
Check out this thread in superuser https://superuser.com/questions/454101/is-there-a-way-to-disable-intel-speedstep-steppings-on-an-ubuntu-server-using-a
Z123 avatar
kz flag
@DougSmythies Edited the questions. Thanks for the suggestion
Doug Smythies avatar
gn flag
Okay, for the acpi-cpufreq CPU frequency scaling driver do: `echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost`. see also [here](https://askubuntu.com/questions/1294142/disabling-amds-equivalent-on-a-zen-1-epyc-of-intels-turbo-boost-at-runtime/1294406#1294406).
Z123 avatar
kz flag
@DougSmythies It worked, thanks!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.