From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: can not use all available memory Date: Fri, 23 Nov 2012 14:55:03 +0200 Message-ID: <20121123125503.GX8912@reaktio.net> References: <50AF5F7E.8030907@amd.co.at> <1353673292.13542.238.camel@zakaz.uk.xensource.com> <20121123122800.GV8912@reaktio.net> <1353674039.16973.3.camel@zakaz.uk.xensource.com> <20121123124115.GW8912@reaktio.net> <1353674827.16973.4.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1353674827.16973.4.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Alexander Bienzeisler List-Id: xen-devel@lists.xenproject.org On Fri, Nov 23, 2012 at 12:47:07PM +0000, Ian Campbell wrote: > On Fri, 2012-11-23 at 12:41 +0000, Pasi K=E4rkk=E4inen wrote: > > On Fri, Nov 23, 2012 at 12:33:59PM +0000, Ian Campbell wrote: > > > On Fri, 2012-11-23 at 12:28 +0000, Pasi K=E4rkk=E4inen wrote: > > > > On Fri, Nov 23, 2012 at 12:21:32PM +0000, Ian Campbell wrote: > > > > > This question belongs on xen-users. > > > > > = > > > > > On Fri, 2012-11-23 at 11:35 +0000, Alexander Bienzeisler wrote: > > > > > > Hello, > > > > > > = > > > > > > i just tried to add a domU with 16 gigs of ram (maxmem =3D 1638= 4, memory =3D = > > > > > > 16384) with free_memory : 28969 but got an error: > > > > > > = > > > > > > libxl: error: libxl.c:3433:libxl_set_memory_target: new target = 0 for = > > > > > > dom0 is below the minimum threshold > > > > > = > > > > > The clue is in this message -- you cannot safely balloon down a g= uest > > > > > (including dom0) to an arbitrarily small value relative to its in= itial > > > > > size. The kernel will have certain fixed datastructures etc which= are > > > > > sized according to the maximum amount of RAM at start of day. > > > > > = > > > > > If you were to balloon down too low then you would run out of RAM= and > > > > > the OOM killer would step in and start killing stuff, so xl inclu= des a > > > > > safety catch which prevents this. > > > > > = > > > > > If you have a huge host and want a small dom0 use the dom0_mem op= tion > > > > > and disable xl's autoballoon option or whatever the equivalent xe= nd > > > > > option is. > > > > > = > > > > = > > > > I think he was already using dom0_mem. He had 28969 free in Xen as > > > > reported by "xl info". > > > = > > > Then he's missed disabling autoballoon. > > > = > > = > > As can be seen from the other email in this thread, > > he's using dom0_mem=3D2048M, and he has 28GB of free memory in Xen. > > = > > Why is xl trying to balloon down dom0 (and failing) for no reason? = > = > Because autoballoon is enabled. > = Yep, autoballoon=3D0 fixed the problem. > This has been discussed at length on the list before, please check the > archives. > = I tried googling quickly but I didn't find anything relevant.. To me this behaviour still seems wrong. What's the point of autoballoon=3D1= trying to = balloon down dom0 if the hypervisor already has enough free memory for the = VM ? = In this case: - dom0_mem=3D2G - new VM to launch with size 16 GB. - Xen has 28 GB of free memory. So clearly there's no need to try to balloon down dom0.. = not-yet-implemented check/feature in xl, or a bug? = Thanks, -- Pasi