From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Chmielewski Subject: Re: Live memory allocation? Date: Tue, 31 Mar 2009 11:30:29 +0200 Message-ID: <49D1E2B5.7030901@wpkg.org> References: <49CB86BE.40505@poboxes.info> <49CB8CF6.70403@wpkg.org> <200903280738.34169.alberto@byu.edu> <49CF6AA4.2060108@redhat.com> <49D0CBCA.3000808@wpkg.org> <49D0CDB4.1010706@redhat.com> <49D0CF58.40109@wpkg.org> <49D0DE26.8040009@redhat.com> <49D0E20D.2010505@wpkg.org> <90eb1dc70903300818u643d0c55n8030f104bc984f6f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Nolan , kvm@vger.kernel.org To: Javier Guerra Return-path: Received: from mx03.syneticon.net ([78.111.66.105]:42657 "EHLO mx03.syneticon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750870AbZCaJaf (ORCPT ); Tue, 31 Mar 2009 05:30:35 -0400 In-Reply-To: <90eb1dc70903300818u643d0c55n8030f104bc984f6f@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Javier Guerra schrieb: > On Mon, Mar 30, 2009 at 10:15 AM, Tomasz Chmielewski wrote: >> Still, if there is free memory on host, why not use it for cache? > > because it's best used on the guest; It is correct, but not realistic from the administrative point of view. Let's say you have several KVM hosts, each with 16 GB RAM. Guests can come and go - so you give them only as much memory as they need (more or less). In other words, normally, you don't create the first guest with 16 GB RAM assigned. Upon creation of the second guest 2 hours later, you don't stop guest 1, just to start both guests with 8 GB RAM a while later. And so on. And so on, stopping and starting a whole bunch of guests until each of them has 512 MB RAM. No, not all guests support ballooning. But for those which support ballooning, the easiest way to implement it would be to write a user-space daemon I guess. > so, not > cacheing already-cached data, it's free to cache other more important > things, or to keep more of the VMs memory on RAM. Correct - if the host knew what the guest already cached, the host could use RAM for other things. Anyway, there are still more pressing issues than that ;) -- Tomasz Chmielewski http://wpkg.org