You are not logged in.

#1 2016-09-17 11:59:33

UniqueActive
Member
Registered: 2016-06-27
Posts: 16

[SOLVED] Pinning CPU Threads to VM

Hello there,

Since yesterday I have been working on a pci passthrough project with this guide: https://wiki.archlinux.org/index.php/PC … PU_pinning
In the section that I linked, I am a bit confused.

on a quad-core machine with hyper-threading

So that means these configurations should be applicable to the I7 6700k, right?
4 cores with hyperthreading are 8 threads, however, when using this example config

If you don't intend to be doing any computation-heavy work on the host (or even anything at all) at the same time as you would on the VM, it would probably be better to pin your VM threads across all of your logical cores, so that the VM can fully take advantage of the spare CPU time on all your cores.

On the quad-core machine mentioned above, it would look like this :

EDITOR=nano virsh edit myPciPassthroughVm

...
<vcpu placement='static'>4</vcpu>
<cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
</cputune>
...
<cpu mode='custom' match='exact'>
    ...
    <topology sockets='1' cores='4' threads='1'/>
    ...
</cpu>
...

It leaves me with only 4 threads running, which makes sense, looking at the way it was configured.
It talks about 4 cores with 1 thread each, that's just 4 threads, which is exactly what I get, not the full utilization of all 8 threads.
What would I have to change to get it to fully utilize all my 8 threads?
Do I just have to change the

<vcpu placement='static'>4</vcpu>

to 8 and change the number of threads to 2?

EDIT: Yeah, that did the trick, sorry for the needless post.

Thanks for your help!

Last edited by UniqueActive (2016-09-17 12:22:35)

Offline

Board footer

Powered by FluxBB