Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

KVM CPU Pinning & Topology Question

Featured Replies

I am attempting to Pin my CPU to specific VM's. Below is my plan of attack. Currently none of my VM's have the CPU pinned. I attempted to pin my Windows 8 VM this morning and got the following message:

 

Error: internal error: vcpu id must be less than maxvcpus

 

Anyone know what that means?

 

have 8 cpus to pin so here is my plan:

 

Unraid: -> gets vcpu=0

 

pfsense VM -> I CPU

 

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

  <cputune>

    <vcpupin vcpu='1' cpuset='1'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='1' threads='1'/>

  </cpu>

 

Ubuntu Server VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='2' cpuset='2'/>

    <vcpupin vcpu='3' cpuset='3'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='2' threads='1'/>

  </cpu>

 

Windows 8 VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='4' cpuset='4'/>

    <vcpupin vcpu='5' cpuset='5'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='2' threads='1'/>

  </cpu>

 

Mac OS X VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='6' cpuset='6'/>

    <vcpupin vcpu='7' cpuset='7'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='2' threads='1'/>

  </cpu>

I'm not an expert on KVM, but I think each VM has vcpus numbered from 0, 1, 2...

 

i.e.

<vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
  </cputune>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>

  • Author

I'm not an expert on KVM, but I think each VM has vcpus numbered from 0, 1, 2...

 

i.e.

<vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
  </cputune>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>

 

I believe that is correct. I am guessing that my cpuset numbers are wrong in my above example??

The problem appears to me to be the vcpus, not cpuset.  vcpus are relative to the VM.  So each VM would have vcpu 0,1,...

 

A VM having 2 vcpus would then have vcpu 0 and 1.  a VM having one vcpu would that have vcpu 0.

 

The vcpus are relative to the VM.  The cpusets are physical cpus numbered from 0 to number of cpus (or threads in hyperthreading on an Intel processor).

 

VM 1

vcpu 0 --> cpu 0

 

VM 2

vcpu 0 --> cpu 1

vcpu 1 --> cpu 2

 

VM 3

vcpu 0 --> cpu 3

vcpu 1 --> cpu 4

vcpu 2 --> cpu 5

vcpu 3 --> cpu 6

 

  • Author

Well I tried what you suggested and the settings took. Thanks! I started all 3 VM's and so far to good. Here are my current settings so if anyone notices something wrong please let me know  ;)

 

pfsense VM -> 1 CPU

 

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

  <cputune>

    <vcpupin vcpu='0' cpuset='1'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='1' threads='1'/>

  </cpu>

 

Ubuntu Server VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='0' cpuset='2'/>

    <vcpupin vcpu='1' cpuset='3'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='2' threads='1'/>

  </cpu>

 

Windows 8 VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='0' cpuset='4'/>

    <vcpupin vcpu='1' cpuset='5'/>

  </cputune>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='2' threads='1'/>

  </cpu>

 

Mac OS X VM -> 2 CPU's

 

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

  <cputune>

    <vcpupin vcpu='0' cpuset='6'/>

    <vcpupin vcpu='1' cpuset='7'/>

  </cputune>

  <cpu mode='custom' match='exact'>

      <model fallback='allow'>core2duo</model>

  </cpu>

  • Author

Looks good,it should be nice to have more cpu:s  ;)

 

//Peter

No joke! I think 32 cores would suffice for the next 6 months or so...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.