From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Magenheimer Subject: RE: failed to start centos 5 domU with maxmem=30000 Date: Thu, 12 Aug 2010 11:00:47 -0700 (PDT) Message-ID: <7aace8e6-6878-40cb-8ed3-e66cf0e90ce1@default> References: <1281608645.5454.10.camel@vase.work> <20100812113731.GP2804@reaktio.net> <1281613063.5454.15.camel@vase.work> <042d87c1-bb13-436b-a5ba-9ec1578d53d0@default 1281615845.5454.20.camel@vase.work> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1281615845.5454.20.camel@vase.work> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: v.tolstov@selfip.ru Cc: xen-devel@lists.xensource.com, Daniel Kiper List-Id: xen-devel@lists.xenproject.org > > > Why this is not provided in documentation or on web site? > > > > Hi Vasily -- > > > > This function limits how far memory can be reduced when > > ballooning a guest (including dom0). It is only a heuristic > > but is intended to take into account the various overheads > > a guest Linux kernel requires to manage memory to avoid > > out-of-memory conditions. > > > > But I think you are correct... the same (or similar) > > function should be published as it also serves as a > > guideline for the ratio between memory=3D and maxmem=3D > > parameters when creating a guest: If the ratio > > of maxmem divided by memory is too high, the guest > > will not even boot. >=20 > Is that possible to use memory=3D32 and maxmem=3D60000 ? I think the answer is no. I believe there is a kernel data structure for each 4K page in physical memory I don't remember the size of this data structure, but assume it is 4 bytes. That means that for 1GB of physical memory (as specified by maxmem) this data structure requires 1MB of physical memory just to track the 1GB. So for your maxmem=3D60000, memory=3D60 would only be enough for this one kernel data structure (and the kernel requires many other data structures to be functional). Daniel Kiper is developing virtual hotplug memory for Xen guests. This may be a good use case for it. =20 > > I am curious as to why you would specify memory=3D so > > much smaller than maxmem=3D. Are you trying to overcommit > > memory for guests that are often idle but sometimes use > > a very large amount of memory? >=20 > We want to provide ability to use small as possible memory if the guest > is idle. And much as possible when the guest under heavy load. This is a much harder problem than it seems. You may want to look at some of the presentations on Transcendent Memory that explain why it is hard. (Most can be found at http://oss.oracle.com/projects/tmem ) Dan