LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-15-2013, 11:04 AM   #1
reformedben
LQ Newbie
 
Registered: Jan 2012
Location: Phoenix, AZ
Distribution: Red Hat, CentOS
Posts: 4

Rep: Reputation: Disabled
How many VMs per CPU can I squeeze?


Hi all - I'm looking to set up a home lab with more than a few CentOS VMs at my fingertips.

I'm planning as using KVM as my hypervisor because of it's relatively small footprint, but regardless of the hypervisor, I'm curious on how many VMs I will be able to squeeze out of the server I'm going to build. Again, this is a home lab, so these VMs would not be running many intensive applications, but mostly for playing around and getting experience setting up/configuring LDAP, DNS, and other infrastructure and their clients.

I'm looking at building a barebones server and from what I've read the VMs will be mostly constrained by CPU. I'm looking at the newer quad-core i5s or i7s. These VMs will probably be 1 CPU x 2GB/4GB VMs, so I'm not planning on overloading the VMs with CPUs.

My question is how many CentOS VMs would I realistically be able to run? Is there a rule of thumb for how many VMs per core?
 
Old 03-15-2013, 01:17 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
It really depends on what they are doing.

If mostly idle, 2 or three per CPU is workable.

If all are busy, then only one per CPU...

And remember to keep at least one core for the host os to use.
 
Old 03-15-2013, 03:33 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Not anything to do with vm per cpu/core from my experience. More real cores helps as most vm's are fully smp up to some number of cores. Like 32 or 64, something like that. I almost never assign to core/cpu. I let the system do what it needs to. If you need to limit then you can assign cores or use other cpu tools to limit.

Kind of boils down to clicks. There are only so many to go around.

I tend to find other resources drag the system down way before cpu fails. You can't easily share one hard drive on 100 vm's. Same for memory, you tend to run out of it pretty fast. You don't really want to use swap as it further kills the system. Cpus are used in almost every transaction so it does count.

Some of the versions of the core i7 are made more for server work. I think the older 3770K was one of them. The Xeon's are made for this task usually. If you like, Opterons are used also.

I have a small development core i7 and ssd that might run 3 or 4 hard running vm's no problem. Maybe 20 or 30 small servers just sitting around would work. I think you'd run out of other stuff way before cpu is the issue.

You would want to get new hardware that allows the best use of vm's if possible. Not all people need advanced features like adding on pci cards and usb.

If I had a choice of the faster cpu and less memory or a bit slower cpu and a lot of ram, I'd go with the more ram option since it is pretty cheap. Ram is fast. Tends to beat out multiple drives/raid in my uses.

How many do you want to run?

Last edited by jefro; 03-15-2013 at 03:38 PM.
 
Old 03-15-2013, 03:38 PM   #4
reformedben
LQ Newbie
 
Registered: Jan 2012
Location: Phoenix, AZ
Distribution: Red Hat, CentOS
Posts: 4

Original Poster
Rep: Reputation: Disabled
I'd realistically like to run ~15 at one time. Again this is just a lab environment, so they would not all be spun up at the same time around the clock, but I would definitely like the flexibility to be able to do so.

I'll have to look at the newer i7s. I'm hoping that my disk usage or memory won't be constrained since I'm going to run the hypervisor/VMs on SSD and will put in at least 16GB of memory.
 
Old 03-15-2013, 03:41 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
For a simple test, you should be able to run 200 maybe on a good server. A good home system should be able to run 20 I'd think. This is again all tied to "It really depends on what they are doing." as jpollard states.

You may also find limit is backplane speed, networking speed. Imagine cutting up your system into 20 or more pieces. What do you have left and how much is host taking? The pieces could get pretty small.

Last edited by jefro; 03-15-2013 at 03:42 PM.
 
Old 03-15-2013, 04:48 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You better be careful about what a "good server" is.

I've seen no more than 20 VMs on a 32 core server with 64GB of memory. After that things get dicy. Yes, some of those VMs were assigned 2 CPUs rather than one.

I have a dual quad, with 8 GB of memory, but I don't want to run more 4 VMs (could do a total of about 5), but I see the system start slowing down.... Yes, it is partially disk I/O limited... but the host system has to deal with memory allocations from 3 (and each has only 1G of memory).

When all three are active, things can slow down - it seems normal most of the time, but there are periods of activity (likely cron based) that get in sync. At these times all four systems kick off administrative tasks at the same time - and the system as whole slows down for 3-5 seconds.

It also makes a difference if you are running a GUI at the same time... (LOTS of memory pigs there). And if the VMs are also running a GUI...
 
Old 03-16-2013, 08:47 AM   #7
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
This, as usual depends on the actual loads. A busy server VM is better off without overallocation, and even with HT off, while a VDI load can easily go up to 1/10 or 1/15 ratio. In any case, if you are building the host yourself, I doubt CPU will be the bottleneck, it's more likely to be the disk subsystem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Overload - Squeeze r00ster Linux - Newbie 1 03-08-2013 03:46 PM
sharing the same cpu between VMs sanaz Linux - Virtualization and Cloud 13 10-19-2012 06:06 AM
[SOLVED] Installing Squeeze. CPU slow? mpyusko Debian 25 09-15-2011 10:51 PM
[Tcptraceroute/Traceroute/Ping] Windows VMs & Linux VMs BiFo Linux - Networking 0 08-24-2010 02:07 PM
LXer: Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) LXer Syndicated Linux News 0 01-14-2009 08:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration