From: "Dan Magenheimer" Subject: RE: [PATCH] linux/balloon: don't allow ballooningdowna domain below a reasonable limit Date: Thu, 1 May 2008 08:44:34 -0600 Message-ID: <20080501084434156.00000002360@djm-pc> References: Reply-To: "dan.magenheimer@oracle.com" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Jan Beulich Cc: Ky Srinivasan , "xen-devel@lists.xensource.com" , KurtGarloff List-Id: xen-devel@lists.xenproject.org > Can't vm_committed_space grow *bigger* than available memory = > when using > swap? It may indicate the 'static' demand for memory (in = > terms of requested > allocations so far) but we're interested in dynamic demand = > (how much of that > allocated memory is actually used), which afaics = > vm_committed_space doesn't > appear very useful for. > = > Some indication of paging churn, or average age of pages in memory, or > something like that, would seem more useful (albeit = > arbitrarily harder to > work out from within the balloon driver!). > = > Maybe I'm missing something. I've only had a quick look at usage of > vm_committed_space. You are right about vm_committed_space growing bigger. I was too terse: I was trying to use it in a min(x,y,z) calculation with the existing algorithm, but apparently it becomes too small sometimes (e.g. during shutdown) and I observed OOM problems. However vm_committed_space seems to be a pretty good dynamic demand indicator in general. Try watch'ing it in a window while doing other tasks on a machine/VM, e.g.: watch grep Committed_AS /proc/meminfo It grows rapidly when memory hogs are launched and shrinks rapidly when the machine goes idle. So it seems to work well for at least a first approximation for selfballooning. Dan