Thanks for the reply, this is the output

Machine (31GB)
  Package L#0 + L3 L#0 (15MB)
    L2 L#0 (256KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0
      PU L#0 (P#0)
      PU L#1 (P#6)
    L2 L#1 (256KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1
      PU L#2 (P#1)
      PU L#3 (P#7)
    L2 L#2 (256KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2
      PU L#4 (P#2)
      PU L#5 (P#8)
    L2 L#3 (256KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3
      PU L#6 (P#3)
      PU L#7 (P#9)
    L2 L#4 (256KB) + L1d L#4 (32KB) + L1i L#4 (32KB) + Core L#4
      PU L#8 (P#4)
      PU L#9 (P#10)
    L2 L#5 (256KB) + L1d L#5 (32KB) + L1i L#5 (32KB) + Core L#5
      PU L#10 (P#5)
      PU L#11 (P#11)

At the moment I have the following in my Domain XML, to pin the first physical 3 cores to corresponding virtual cores. My question though, is how do I know which vcpus are siblings for a given topology specified in <cpu><topology>...</cpu></topology>?

<vcpu placement='static' cpuset="1-6">6</vcpu>

<cputune>
    <vcpupin vcpu="0" cpuset="0"/>
    <vcpupin vcpu="1" cpuset="6"/>
    <vcpupin vcpu="2" cpuset="1"/>
    <vcpupin vcpu="3" cpuset="7"/>
    <vcpupin vcpu="4" cpuset="2"/>
    <vcpupin vcpu="5" cpuset="8"/>
</cputune>

Thanks for the help!

-------- Original Message --------
Subject: Re: [libvirt-users] CPU Pinning Help
From: Ram Krishna <krishna.ubuntu@gmail.com>
Date: Tue, March 21, 2017 1:13 am
To: arrakis@tsiom.com
Cc: libvirt-users@redhat.com

can you try lstopo command

On Mar 19, 2017, at 9:54 PM, <arrakis@tsiom.com> <arrakis@tsiom.com> wrote:

Hello, I was hoping someone help me regarding my KVM Domain XML file. I have a 1 socket, 6 core processor with hyperthreading. I wanted to pin 3 full cores (6 threads on 3 cores) to my KVM instance with a 1-1 mapping (so that the KVM instance has 3 cores and 6 total threads). I thus used the following in my xml file:

<cpu mode='host-model> <topology sockets='1' cores='3' threads='2'/> </cpu>

I know what physical cpu ids are siblings (share the same processor cores) through $(cat /proc/cpu) or $(virsh capabilities).  However, in the <cputune> section, when pinning vcpus ids to physical cpus, I need to know which vcpu ids are "siblings" (which vcpu ids share the same virtual core). I would imagine vcpu ids 0 & 1 are siblings, 2 & 3 are siblings etc, but I cannot find anywhere in the documentation which confirms this.

Could someone please help?
Many thanks! 


_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users