Passthrough of Cores and Threads

andy77

Well-Known Member
Jul 6, 2016
248
13
58
40
Hi all,

can I pass all cores and threads to a Virtual Machine?
So that the machine has for example all 8 cores and all 16 threads of the node.
Purpose for this is licensing.

Thanks in advance for answering.


Regards,
Andreas
 
can I pass all cores and threads to a Virtual Machine?
Yes, you can but this is not smart.
You should never use more than n -1 cores for a VM.
n is the total count of logical cores.

The point is the PVE OS need one core for system operation like webserver, logging, .... .
So if you give the VM all cores the host has to schedule the process what ends in less performance.
 
Hi,

sorry, I didn't express myself properly.

The goal is to give one VM max. 8 virtual cores, but still have 16 threads in this VM. Reason for this is SQL Licensing because it is licensed per Core, so that on a physical machine with 8 hardware cores, you would only have to license 8 cores and would have 16 threads, but in a VM for having 16 threads you would need 16 vCores what means double licensing costs.


Regards,
Andreas
 
Proxmox VE has no setting for Pinning down Cores to CPUs.
But you can do this manually with taskset and write this in a post start hook script.
 
Hmm... but as I understand "taskset" it would not help in my example.
I still would have to assign 8 vcors only to the VM what would result in running only 8 threads and the usage of 4 hardware cores????
 
This is not supported, because in the past has this feature significant performance problems.
But you can try to add args in the config.
Code:
args: -smp '16,sockets=1,cores=8,threads=2,maxcpus=16'
 

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!