From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: CPU and RAM in VMs Date: Sun, 12 Dec 2010 12:48:50 +0200 Message-ID: <4D04A892.3090201@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Andreas Rittershofer Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6092 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796Ab0LLKsz (ORCPT ); Sun, 12 Dec 2010 05:48:55 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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