Comments (3)
I must have made a mistake somewhere while editing the pinning since I can't reproduce the 'worse' results with your configuration anymore. Thanks for helping me out anyway!
from gpu-passthrough-tutorial.
Hey sorry for the delayed response...
First, let me refer you to this section of the arch wiki page on cpu pinning. Here you'll see the use of the command lspcu -e
. The cpu threads are numbered on the leftmost "CPU" column and you can see which threads share the same physical core under the "CORE" column. Pretty much every tutorial on the subject will tell you to pin threads together by physical cores and not across different physical cores. In your modified example, you're pinning threads across different physical cores. This is simply not recommended anywhere and I'm genuinely surprised to see better performance numbers.
Let's say based on the CPU topography for your 3950X that I wanted to pass physical cores 8-15 (bottom row of lstopo
) to the guest and leave 0-7 (top row of lstopo
) to the host. This corresponds to passing 16 out of 32 logical threads to your VM. Here's what I'd expect the correct pinning configuration with threads paired by physical cores to look like:
<vcpu placement="static">16</vcpu>
<cputune>
<vcpupin vcpu="0" cpuset="8"/>
<vcpupin vcpu="1" cpuset="24"/>
<vcpupin vcpu="2" cpuset="9"/>
<vcpupin vcpu="3" cpuset="25"/>
<vcpupin vcpu="4" cpuset="10"/>
<vcpupin vcpu="5" cpuset="26"/>
<vcpupin vcpu="6" cpuset="11"/>
<vcpupin vcpu="7" cpuset="27"/>
<vcpupin vcpu="8" cpuset="12"/>
<vcpupin vcpu="9" cpuset="28"/>
<vcpupin vcpu="10" cpuset="13"/>
<vcpupin vcpu="11" cpuset="29"/>
<vcpupin vcpu="10" cpuset="14"/>
<vcpupin vcpu="11" cpuset="30"/>
<vcpupin vcpu="10" cpuset="15"/>
<vcpupin vcpu="11" cpuset="31"/>
<cputune>
Please go ahead and confirm whether your current configuration outperforms this one. I would not expect it to. Here's the configuration I suggest you run a comparison with in which threads are paired across different physical cores:
<vcpu placement="static">16</vcpu>
<cputune>
<vcpupin vcpu="0" cpuset="8"/>
<vcpupin vcpu="1" cpuset="9"/>
<vcpupin vcpu="2" cpuset="10"/>
<vcpupin vcpu="3" cpuset="11"/>
<vcpupin vcpu="4" cpuset="12"/>
<vcpupin vcpu="5" cpuset="13"/>
<vcpupin vcpu="6" cpuset="14"/>
<vcpupin vcpu="7" cpuset="15"/>
<vcpupin vcpu="8" cpuset="24"/>
<vcpupin vcpu="9" cpuset="25"/>
<vcpupin vcpu="10" cpuset="26"/>
<vcpupin vcpu="11" cpuset="27"/>
<vcpupin vcpu="10" cpuset="28"/>
<vcpupin vcpu="11" cpuset="29"/>
<vcpupin vcpu="10" cpuset="30"/>
<vcpupin vcpu="11" cpuset="31"/>
<cputune>
I've also gone ahead and edited the README for the tutorial to make the cpu pinning section a little bit easier to understand. Please report back with your results.
from gpu-passthrough-tutorial.
Closing issue awaiting response
from gpu-passthrough-tutorial.
Related Issues (20)
- virt-manager cannot find PCIe devices from name HOT 1
- System crashed during VM startup HOT 1
- nodedev-detach hangs HOT 5
- Unable to complete install: 'Hook script execution failed: internal error: Child process HOT 1
- qemu.d not showing
- $MEMORY not assigned in kvm.conf HOT 3
- Query about host GPU HOT 2
- Hugepages was renamed to libhugetlbfs-bin
- memfd hugepages apparmor question HOT 1
- Problems since new Kernels HOT 2
- Virsh detach hangs HOT 3
- Binding at startup; can't unbind correctly HOT 2
- AMD GPU audio won't bind to vfio HOT 6
- unable to map backing store for guest RAM: Cannot allocate memory HOT 1
- alloc_hugepages.sh error HOT 2
- So close, but not quite working...? HOT 2
- nodedev-reattach hangs HOT 2
- qemu.d folder is not created. HOT 1
- Hanging on Creating Domain #12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpu-passthrough-tutorial.