From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasiliy G Tolstov Subject: RE: failed to start centos 5 domU with maxmem=30000 Date: Fri, 13 Aug 2010 09:56:11 +0400 Message-ID: <1281678971.9689.7.camel@vase.work> 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> <7aace8e6-6878-40cb-8ed3-e66cf0e90ce1@default> Reply-To: v.tolstov@selfip.ru Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <7aace8e6-6878-40cb-8ed3-e66cf0e90ce1@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: xen-devel@lists.xensource.com, Daniel Kiper List-Id: xen-devel@lists.xenproject.org =D0=92 =D0=A7=D1=82=D0=B2, 12/08/2010 =D0=B2 11:00 -0700, Dan Magenheimer= =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > > 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 ? >=20 > 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). >=20 Ok. Thank's. > Daniel Kiper is developing virtual hotplug memory for Xen > guests. This may be a good use case for it. > =20 I'm try for my systems. Thank's > > > 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 gue= st > > is idle. And much as possible when the guest under heavy load. >=20 > 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 ) Need to support in domU... this is bad. But i'm try it.=20 --=20 Vasiliy G Tolstov Selfip.Ru