Naive question : how many VMs can i run with 4 cores ?

mascip

n00b
Joined
Jul 9, 2012
Messages
41
Hi all,

i have read in the VirtualBox documentation, and in other places, that i should only have one VM per core. So with 4 cores, i should not run more than 4 VMs.

Nonetheless, on this website
http://www.exonetric.com/products/newjail.html
They say that they use "1 physical CPU per 10 jails".

I emailed them to ask about it, and they answered that their "jails" are similar to VMs, and that "there's no assignment of CPU cores to jails, all of the CPUs get shared equally by all processors."
And "you're sharing 4 cores from a E5606 @ 2.13GHz."

Does it mean that having more than 1 VM per core is possible, but simply that each VM will be slower ?

I'm building my first computer, and hoping to run at least 4 VMs simultaneously with it... and if possible more. And i am wondering if it's worth me investing in a better processor, in order to run more VMs. At the moment i'm thinking of getting a i5-3470S (for a small M350 case).
And my VMs won't do anything intensive, but each of them will either have to run Debian or Windows 7.
 
Last edited:
You can share physical cores with multiple VMs...else people would be very limited on consolidation. It all depends on how active those VMs are. For example, in my lab I run VMware's vCenter Operations Manager to monitor performance and it gives me estimates on what my "optimal" density is. Since my VMs aren't real busy I can actually go 24:1 vCPU:CPU. You can go very dense.
 
16GB (2x8GB) Corsair DDR3 Vengeance Low Profile Jet Black PC3-12800 (1600), Non-ECC Unbuffered, CAS 9-9-9-24, XMP, 1.5V
 
Apparently VirtualBox doesn't impose any artificial limits on number of VMs you can run on a given host. That said I wouldn't recommend trying to create 1025 VMs on your 4 core 16GB machine just to show up Hyper-V 2012.
 
Running a hypervisor and assuming server 2008 R2 for example, I would not run more then 4, only because running the OS on less than 4GB is no fun.
 
In real world production. Usually do not want to go above a oversub rate of 4-8:1 Depends on the rest of the hardware.

In testing, use whatever you desire since ram is usually the limit.
 
That REALLY depends on what the 2008 R2 servers are doing, but a domain controller or file server for home usage could easily get away with ~1GB per VM without any negative effects. HD IOPS will be far more limiting a factor than RAM.
 
I run about 5:1 on my Hyper-V hosts with a slower celeron with no issues. As said it all depends on what the machines are doing. I have put fairly idle 2008R2 machines 10:1 with no problem and run them on 768mb of RAM a piece.

The nice thing in the virtual world is you can start off small, and add as necessary. Things like File Servers, Connection Brokers, DCs, etc. can often run on very little resources until the user loads get very large.
 
When you talk consolidation ratios make sure you note hosts or CPU core. It's not uncommon to see 40 or 50:1 host consolidation (50 VMs on 1 host)...and higher, but most people don't want a server failure to take down that many at once. For VDI we'll do >100:1 consolidation easy.
 
If i ran 8 VMs with 4 cores,
is it best to run 2 on each core,
or to run 8 on all cores ?
 
You don't normally assign VMs to cores. The Hypervisor scheduler does it for you. You can with many hypervisors set affinity rules so a VM will use the same cores, but let the scheduler do it automatically. It knows.
 
depends on how active each of those VMs are.
I have a 4 core with 7 vms running and it hums along fine.
Domain Controller 1core
FileServer 4cores
ip security camera system 1core
Untangle 1core
GameServer 2core
Windows 8 1core
LinuxMint 1core

Only the fileserver ever really uses much processing time, the rest of them barely use any. The reason the fileserver requires so much is that its constantly doing compression of backups and encoding. Everything is pretty much fine and dandy unless the game servers get filled up while the fileserver is encoding. But the timetables for those never really cross each other. Backups are done at 9am which is when I go to work. Playing games only happen like 6pm-2am.
 
Thank you.
I don't play games and don't have a file server.

Basically, it will just be Debian or Windows 7 running on each of them, with 2 browsers opened, and... that should pretty much be it. Sometimes a spreadsheet too.

I guess, i'll try it when i've build the computer :)
 
Thank you.
I don't play games and don't have a file server.

Basically, it will just be Debian or Windows 7 running on each of them, with 2 browsers opened, and... that should pretty much be it. Sometimes a spreadsheet too.

I guess, i'll try it when i've build the computer :)

Oh yeah if thats all you doin you will be fine.
 
Back
Top