psf / pyperf

Toolkit to run Python benchmarks
http://pyperf.readthedocs.io/
MIT License
782 stars 77 forks source link

Having trouble tuning in WSL #109

Open mcandre opened 3 years ago

mcandre commented 3 years ago

Trace:

$ sudo env "PATH=$PATH VIRTUAL_ENV=$VIRTUAL_ENV" pyperf system tune
Tune the system configuration to run benchmarks
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

Actions
=======

Perf event: Max sample rate set to 1 per second

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

CPU: use 8 logical CPUs: 0-7
Perf event: Maximum sample rate: 1 per second
ASLR: Full randomization
Linux scheduler: No CPU is isolated
IRQ affinity: Default IRQ affinity: CPU 0-7
IRQ affinity: IRQ affinity: IRQ 0-15=CPU 0-7
Power supply: the power cable is plugged

Advices
=======

Linux scheduler: Use isolcpus=<cpu list> kernel parameter to isolate CPUs
Linux scheduler: Use rcu_nocbs=<cpu list> kernel parameter (with isolcpus) to not schedule RCU on isolated CPUs

Errors
======

Turbo Boost (MSR): Failed to read MSR 0x1a0 from /dev/cpu/0/msr: [Errno 2] No such file or directory: '/dev/cpu/0/msr'
Turbo Boost (MSR): Try to load the msr kernel module: sudo modprobe msr
IRQ affinity: Unknown service state: ' * irqbalance is not running'
IRQ affinity: Unknown service state: ' * irqbalance is not running'

pyperf 2.2.0, Ubuntu 20.04 Focal Fossa, WSL 2, Windows 10.

vstinner commented 3 years ago

"system tune" depends a lot on the platform. WSL is currently not supported. Patches are welcomed!