can we configure the number of threads of a cpu for any given vm cpu?

iPanini

Well-Known Member
Mar 30, 2019
45
2
48
64
Hi, can someone confirm whether it is possible (or impossible) to configure the number of threads for any given virtual machine's cpu?

I'm on Proxmox 5.3-5.
I can set the number of cores.
But it seems I can not set the number of threads? (maybe from the command line?)

Thanks for helping out!
 
You can configure the numa nodes, but that's all. Normally it does not matter (except NUMA) if you have one CPU with 4 cores or 4 CPUs. The SMP is the same and the client does know that the CPU is emulated so it normally also does not care.

Maybe you can describe what your problem is? If it's licensing, then you need to ask the vendor. For all processor and core licensing questions, the answer for many big companies like MS, Oracle, etc. is that you need to license all cpu sockets and/or cores on your hypervisor, not the guest.
 
You can configure the numa nodes, but that's all. Normally it does not matter (except NUMA) if you have one CPU with 4 cores or 4 CPUs. The SMP is the same and the client does know that the CPU is emulated so it normally also does not care.

Maybe you can describe what your problem is? If it's licensing, then you need to ask the vendor. For all processor and core licensing questions, the answer for many big companies like MS, Oracle, etc. is that you need to license all cpu sockets and/or cores on your hypervisor, not the guest.

Hi Bil, thanks for replying;
It's not a specific problem.

I already have a (free) Proxmox server running and would like to complement it with a second one.
Idea would be in the first place to create a (backup) mirror.

In the meantime I have been looking at Teresa's video's (Morgonaut) where she uses a Proxmox machine with 2 GPU cards and GPU passthrough.
In this way effectively creating a dual machine in one as it where.
In the video, If I'm not mistaken, she mentions specifically that she dedicates only 4 threads out of 12 from a 6 core, 12 thread cpu (i7-8700k), she repeats 'threads, not cores'

Hence my question whether it's possible to dedicate threads (from a cpu / core).

Thanks for helping out!
 
Hence my question whether it's possible to dedicate threads (from a cpu / core).

No, because there is no difference between a core and a thread softwarewise. If you look at the cpu ids in /proc/cpuinfo, you see that. It also does not make sense to dedicate resources in a virtualised system. Virtualisation has been invented to share resources better and dedication is counter productive. Besides, you cannot dedicate a cpu in PVE, because a VM runs as a processes on the Hypervisor (Linux) so that the Linux scheduler schedules everything. You can, however pin it to NUMA nodes if you have multiple CPUs.

These dual-machines in the video are often also used by Linus from Linus tech tips with unraid to build monster gaming machines out of server hardware. Maybe you should also have a look at unraid, because PVE is mainly server virtualisation and not for virtualising desktop systems. unraid on the other hand is better suited for this.
 
Hi all

Coming from a VMware background I’ve never heard of assigning threads as it’s emulation within the cpu for an additional data path.

2 x paths for data to travel on per core theoretically allowing parallel processing to happen.

But the core still only processes one path at a time. On/off between paths.

It makes it look like there are more cores due to parallel processing.

This was designed so the core isn’t sitting around waiting ideally for the next process to come down.

As far as I understand it’s all controlled on chip.

You can either disable or enable hyperthreading with a patch as this is what is used to secure a cpu from the “L1 Terminal Fault” vulnerably.

https://software.intel.com/security...ts/deep-dive-intel-analysis-l1-terminal-fault

I think Teresa may have just misspoken.

Lnxbill’s point about core assignment and NUMA is spot on.

I’m happy to be corrected.

“”Cheers
G
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!