How do I let the hypervisor assign cores? (Is it like this⤵︎?)


Recommended Posts

Um, that's kinda it. I'll elaborate…

 

I want to assign a number of cores to a VM, but not which cores should it use. I'd like to leave that to the hypervisor to decide on its own. That way I don't need a spreadsheet to keep track of 'em.

 

On containers it's easy, you just add --cpu=#, I believe (might be a little off). Just now, while gathering details to write this, I noticed when you switch to XML view, there are some hard-to-miss CPU-related tags:

  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='20'/>
    <vcpupin vcpu='2' cpuset='9'/>
    <vcpupin vcpu='3' cpuset='21'/>
  </cputune>

 

Of those the <cputune> element, obviously seems responsible for the assignment of the cores.

 

I thought maybe if I get rid of the tag I solve the issue, until I noticed the attributes of the <vcpu> tag/element above; placement='static'. Since I don't know what's the opposite of "static", e.g; dynamic, auto, reactive, responsive, elastic, something-NUMA, sky's the limit. If I were to just remove the attribute and the element below it like this:

  <vcpu>4</vcpu>

 

Would that work?

 

tenquiu veri motsh*

 

Thanks, for real this time.

 

__________________________________________________________________________________

*: "thank you very much", as it would be spelled in Spanish 😆

Edited by vitaprimo
Changed quotes for proper preformatted/code blocks
Link to comment
12 minutes ago, vitaprimo said:

Um, that's kinda it. I'll elaborate…

 

I want to assign a number of cores to a VM, but not which cores should it use. I'd like to leave that to the hypervisor to decide on its own. That way I don't need a spreadsheet to keep track of 'em.

 

On containers it's easy, you just add --cpu=#, I believe (might be a little off). Just now, while gathering details to write this, I noticed when you switch to XML view, there are some hard-to-miss CPU-related tags:

  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='20'/>
    <vcpupin vcpu='2' cpuset='9'/>
    <vcpupin vcpu='3' cpuset='21'/>
  </cputune>

 

Of those the <cputune> element, obviously seems responsible for the assignment of the cores.

 

I thought maybe if I get rid of the tag I solve the issue, until I noticed the attributes of the <vcpu> tag/element above; placement='static'. Since I don't know what's the opposite of "static", e.g; dynamic, auto, reactive, responsive, elastic, something-NUMA, sky's the limit. If I were to just remove the attribute and the element below it like this:

  <vcpu>4</vcpu>

 

Would that work?

 

tenquiu veri motsh*

 

Thanks, for real this time.

 

__________________________________________________________________________________

*: "thank you very much", as it would be spelled in Spanish 😆

does cpu pinning in settings tab not work for you where you can see allocations for allvms dockers?

Link to comment

😂

I'm definitely gonna be the idiot of the week, aren't I?

 

I haven't bothered to check there in ages since it's not something I needed (pinning). That said, in answer to my question/what I said before, would it work?

 

Dynamically (re-)allocating the core would still be more useful if, say, two VMs with overlapping cores spiked their loads so that they can be scheduled to idle cores instead of sharing the maxed out core(s). After all, oversubscription is kinda the  whole  main point of hypervisors, right?

 

I'll guess I have to set up a new VM to test. This is when I wish I had an orchestrator for Unraid.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.