pCPU vCPU ratio
by LQParsons from LinuxQuestions.org on (#5C996)
Long ago and far away I started learning about KVM/QEMU with a reasonably sized CentOS/7 machine. With CentOS/7 now over (EOL 2024), CentOS/8 just announced its EOL will be 2021. It was getting time for a new machine (hopefully correcting errors I made before: always like making new & imaginative errors ha ha ha), and decided to convert to OpenSuSE with my new machine.
So I'm reading SuSE stuff, and re-evaluating how I've implemented my solutions to date. Which brings me to this:
Do y'all have rules of thumb for how many vCPUs per VM, and how many vCPUs total (all VMs)?
I'm assuming my "pool" is (#COREs * #Threads = #Logical CPU), so 4 dual-core CPUs, two threads each gives me 16.
(It's my impression that hyperThreading is more hype, so take it if you can get it, you don't have to go looking for it.)
One article I'm leaning toward going with suggests it is such an art and not a science/formula, begin with 4 vCPU per VM, then take measurements, and over time decide to leave it or fuss with it.
SuSE documents seem to say I can allocate (some large number) more vCPU than I have real (or logical) ones.
I would think vCPU being equal would be the way to go:
why/what circumstances would I want more vCPU than actual?
What consequences--or cost--to have too many vCPUs for a VM -- and how would I tell that?
And then finally, am I really only concerned about all this per VM, and only casually interested in total vCPU for all VMs running?
Or is that number the one of real interest?
I'm right now spec'ing out my system, memory, memorySize, and disk space.
I've decided things like going again with LVM and let it give me its software RAID-1.
But I'm least sure how to calculate, use, manage the vCPUs.
Any advice, comments, counsel muchly appreciated.
And Happy New Year's Everybody! :)


So I'm reading SuSE stuff, and re-evaluating how I've implemented my solutions to date. Which brings me to this:
Do y'all have rules of thumb for how many vCPUs per VM, and how many vCPUs total (all VMs)?
I'm assuming my "pool" is (#COREs * #Threads = #Logical CPU), so 4 dual-core CPUs, two threads each gives me 16.
(It's my impression that hyperThreading is more hype, so take it if you can get it, you don't have to go looking for it.)
One article I'm leaning toward going with suggests it is such an art and not a science/formula, begin with 4 vCPU per VM, then take measurements, and over time decide to leave it or fuss with it.
SuSE documents seem to say I can allocate (some large number) more vCPU than I have real (or logical) ones.
I would think vCPU being equal would be the way to go:
why/what circumstances would I want more vCPU than actual?
What consequences--or cost--to have too many vCPUs for a VM -- and how would I tell that?
And then finally, am I really only concerned about all this per VM, and only casually interested in total vCPU for all VMs running?
Or is that number the one of real interest?
I'm right now spec'ing out my system, memory, memorySize, and disk space.
I've decided things like going again with LVM and let it give me its software RAID-1.
But I'm least sure how to calculate, use, manage the vCPUs.
Any advice, comments, counsel muchly appreciated.
And Happy New Year's Everybody! :)