Overprovision CPUs

gogito

Member
Jan 12, 2022
11
1
8
25
My host has 4 cores 8 threads. Does it make sense to allocate 8 vCPU to all my LXC and VMs if I know that none of them will ever max out all 8vCPU at the same time? I'm not sure if that will create any scheduling issue or overhead as compares to allocate a smaller number to each of them. I saw a lot of conflicting info but some date back to 5 years ago.

My idea is that all VM/LXC will have max available CPU when they need and since they will never max out at the same time, there will be no issue.

If I need to leave some spare for the host then how about allocating 6 vCPU?

Thanks in advance!
 
The threads don't give you twice as much CPU power, it's more like 20-40% at best. For a smooth experience, I would only give anything at most 4 virtual CPUs. That leaves the 4 extra threads for background processing (when one VM uses all 4), emulation, network and disk I/O, logging statistics, etc.

EDIT: Make sure not to overcomit on memory (stay below 80%), as that will really make for a miserable experience. Since you have a very small CPU (for current virtualization standards), you probably also don't have the memory to run many VMs at the same time. But don't let that stop you from experimenting and tuning your system to fit your particular work-load!
 
Last edited:
The threads don't give you twice as much CPU power, it's more like 20-40% at best. For a smooth experience, I would only give anything at most 4 virtual CPUs. That leaves the 4 extra threads for background processing (when one VM uses all 4), emulation, network and disk I/O, logging statistics, etc.

EDIT: Make sure not to overcomit on memory (stay below 80%), as that will really make for a miserable experience. Since you have a very small CPU (for current virtualization standards), you probably also don't have the memory to run many VMs at the same time. But don't let that stop you from experimenting and tuning your system to fit your particular work-load!
Thanks, you're right that currently I'm limited on memory. The setup is a Haswell Xeon 4c8t and 16gb of ddr3. I'm moving to a i5 12400 6c12t and 64gb of ddr4 next week.

I honestly don't really need much more cpu power and the xeon is doing just fine with my 2 VMs + 20 or so LXC but ram is cutting it close at 12gb/16gb.

I'll probably will try to set the required amount of vCPU to my VMs and LXC and increase them as I needed. Feels like that's more sensible and will avoid possible issues.

Will rethink on the over provisioning once my VMs and LXC actually need to tap into the full resources of the CPU.
 

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!