From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Memory under KVM? Date: Sun, 13 Dec 2009 18:45:38 +0200 Message-ID: <4B251A32.4010207@redhat.com> References: <4B22BCE5.7040208@binaryfreedom.info> <200912121337.59872.tfjellstrom@shaw.ca> <4B24BD0D.8070003@redhat.com> <200912130941.47737.tfjellstrom@shaw.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: tfjellstrom@shaw.ca Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14714 "HELO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751825AbZLMQpk (ORCPT ); Sun, 13 Dec 2009 11:45:40 -0500 In-Reply-To: <200912130941.47737.tfjellstrom@shaw.ca> Sender: kvm-owner@vger.kernel.org List-ID: On 12/13/2009 06:41 PM, Thomas Fjellstrom wrote: > >> Use the balloon driver to return memory to the host. >> > Will it actually just free the memory and leave the total memory size in the > VM alone? Last I checked it would just decrease the total memory size, which > isn't that useful. Sometimes it needs more ram, so its given 512M ram, but > most of the time can live on 100M or so. > If you balloon and than balloon back the guest will be able to reallocate all this memory. >> The Linux vm prefers anonymous memory, so guests do get an advantage. >> >> > I think the only thing I'd like to have now is automatic memory return, much > like vmware server has. It doesn't change what the guest VM sees, it just > flushes the unused ram back to the host. > Linux usually keeps very little RAM free (it's kept as cache). So there has to be some action on the part of the host to get the guest to free things. For Windows guests you can use ksm to reclaim free memory (since Windows will zero it). -- error compiling committee.c: too many arguments to function