pve-helpers icon indicating copy to clipboard operation
pve-helpers copied to clipboard

CPU pinning issue

Open lo3w3n opened this issue 4 years ago • 8 comments

##CPU PIN #cpu_taskset 13-23 #assign_interrupts 13-23 --all

Getting this error on VM launch

taskset: failed to set pid 84705's affinity: Invalid argument

lo3w3n avatar Jan 03 '22 09:01 lo3w3n

What does lscpu show?

ayufan avatar Jan 03 '22 09:01 ayufan

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 48 bits physical, 48 bits virtual CPU(s): 24 On-line CPU(s) list: 0-23 Thread(s) per core: 2 Core(s) per socket: 12 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 25 Model: 33 Model name: AMD Ryzen 9 5900X 12-Core Processor Stepping: 0 Frequency boost: enabled CPU MHz: 3700.000 CPU max MHz: 4950.1948 CPU min MHz: 2200.0000 BogoMIPS: 7400.63 Virtualization: AMD-V L1d cache: 384 KiB L1i cache: 384 KiB L2 cache: 6 MiB L3 cache: 64 MiB NUMA node0 CPU(s): 0-23 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Full AMD retpoline, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected 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 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 ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed a dx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbn oinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctr l umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm

lo3w3n avatar Jan 03 '22 10:01 lo3w3n

Any info?

lo3w3n avatar Jan 03 '22 15:01 lo3w3n

Hi. Did the above info shed any light on the issue and suggest a possible solution?

lo3w3n avatar Jan 11 '22 07:01 lo3w3n

Unsure. There's nothing truly wrong in what you send here.

Try doing this manually:

taskset -a -p -c "13-23" $(cat /var/run/qemu-server/$VMID.pid)

Also show lscpu -e as this is authoritative information. The /proc/cpuinfo might show more than is actually available.

ayufan avatar Jan 11 '22 08:01 ayufan

ok I will try that

lo3w3n avatar Jan 11 '22 08:01 lo3w3n

still errors out with the same error

lo3w3n avatar Jan 11 '22 15:01 lo3w3n

I don't think I should use the -a flag as taskset is trying to set affinity for non existent PID

lo3w3n avatar Jan 11 '22 16:01 lo3w3n