psf / psf/pyperf

Boost tuning for AMD processors

Open
#120 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
962
Forks
106
Avg merge
2d 18h
Merged PRs (30d)
4

Description

python -m pyperf system has no code to toggle Boost of AMD Ryzen processors. Boost can be disabled globally with echo 0 > /sys/devices/system/cpu/cpufreq/boost.

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 113
model name      : AMD Ryzen 7 3800X 8-Core Processor
stepping        : 0
microcode       : 0x8701021
cpu MHz         : 2200.000
cache size      : 512 KB
physical id     : 0
siblings        : 16
core id         : 0
cpu cores       : 8
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 16
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sme sev sev_es
bugs            : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 7784.92
TLB size        : 3072 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]
$ sudo bin/python -m pyperf system
Show the system configuration

System state
============

CPU: use 4 logical CPUs: 12-15
Perf event: Maximum sample rate: 1 per second
ASLR: Full randomization
Linux scheduler: Isolated CPUs (4/16): 12-15
Linux scheduler: RCU disabled on CPUs (4/16): 12-15
CPU Frequency: 0-11=min=2200 MHz, max=3900 MHz; 12-15=min=max=3900 MHz
IRQ affinity: irqbalance service: inactive
IRQ affinity: Default IRQ affinity: CPU 0-11
IRQ affinity: IRQ affinity: IRQ 0,2=CPU 0-15; IRQ 1,3-15,25-27,29-30,41-42,44,46-53,58-59,93-94,96,98=CPU 0-11; IRQ 60=CPU 0; IRQ 61=CPU 1; IRQ 62=CPU 2; IRQ 63=CPU 3; IRQ 64=CPU 4; IRQ 65=CPU 5; IRQ 66=CPU 6; IRQ 67=CPU 7; IRQ 68=CPU 8; IRQ 69=CPU 9; IRQ 70=CPU 10; IRQ 71=CPU 11; IRQ 72=CPU 12; IRQ 73=CPU 13; IRQ 74=CPU 14; IRQ 75=CPU 15; IRQ 76-91=CPU None
Power supply: the power cable is unplugged

Advices
=======

Power supply: The power cable must be plugged

Warnings
========

Turbo Boost (MSR): Failed to read MSR 0x1a0 from /dev/cpu/12/msr: [Errno 5] Input/output error

OK! System ready for benchmarking

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the implementation behind python -m pyperf system and its existing CPU-frequency or Turbo Boost reporting. Verify how /sys/devices/system/cpu/cpufreq/boost behaves on AMD Ryzen systems, then define completion as the system command supporting AMD boost state handling without breaking existing output or checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
cli, operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.