1

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
  • 15,448
  • 5
  • 44
  • 61
Z123
  • 11
  • 2
  • 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. – Doug Smythies Apr 11 '23 at 23:44
  • 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 – j0h Apr 11 '23 at 23:45
  • @DougSmythies Edited the questions. Thanks for the suggestion – Z123 Apr 11 '23 at 23:55
  • Okay, for the acpi-cpufreq CPU frequency scaling driver do: echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost. see also here. – Doug Smythies Apr 11 '23 at 23:59
  • @DougSmythies It worked, thanks! – Z123 Apr 12 '23 at 00:07

0 Answers0