public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* CPU and RAM in VMs
@ 2010-12-12 10:04 Andreas Rittershofer
  2010-12-12 10:48 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rittershofer @ 2010-12-12 10:04 UTC (permalink / raw)
  To: kvm

Given is a situation as follows:

One physical machine with 4 CPUs and 16 GB RAM. On this machine KVM and three virtual machines are installed.

VM1: 2 CPUs, 8 GB RAM
VM2: 2 CPUs, 6 GB RAM
VM3: 1 CPU, 4 GB RAM

As you can see, the sum of all virtual CPUs is greater than the number of physically available CPUs, the same with the RAM.

What does happen, when all three VMs are started? They will need 5 CPUs, but only 4 CPUs are physically availabe, they will need 18 GB of RAM, but only 16 GB of RAM are physically available? What will KVM do in such a situation?


Viele Grüße

Andreas Rittershofer

-- 
Hier könnte keine Signatur stehen.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CPU and RAM in VMs
  2010-12-12 10:04 CPU and RAM in VMs Andreas Rittershofer
@ 2010-12-12 10:48 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-12-12 10:48 UTC (permalink / raw)
  To: Andreas Rittershofer; +Cc: kvm

On 12/12/2010 12:04 PM, Andreas Rittershofer wrote:
> Given is a situation as follows:
>
> One physical machine with 4 CPUs and 16 GB RAM. On this machine KVM and three virtual machines are installed.
>
> VM1: 2 CPUs, 8 GB RAM
> VM2: 2 CPUs, 6 GB RAM
> VM3: 1 CPU, 4 GB RAM
>
> As you can see, the sum of all virtual CPUs is greater than the number of physically available CPUs, the same with the RAM.
>
> What does happen, when all three VMs are started? They will need 5 CPUs, but only 4 CPUs are physically availabe, they will need 18 GB of RAM, but only 16 GB of RAM are physically available? What will KVM do in such a situation?
>

Linux will timeshare the cpus across the guests, and use swap space to 
provide extra memory.  Both of these can reduce performance.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-12 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 10:04 CPU and RAM in VMs Andreas Rittershofer
2010-12-12 10:48 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox