WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Block device caching causes out of memory in dom0

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Block device caching causes out of memory in dom0
From: Nick Craig-Wood <nick@xxxxxxxxxxxxxx>
Date: Fri, 19 Aug 2005 17:12:31 +0100
Cc: ian.pratt@xxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 19 Aug 2005 16:10:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D282C1B@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D282C1B@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Aug 19, 2005 at 04:17:33PM +0100, Ian Pratt wrote:
> > We run our dom0's with 128MB of RAM using xen 2.0.6, kernel 
> > 2.6.11 for dom0 and domUs, and typically have ~10 domUs per 
> > server.  All the domU filingsystems are loopback files served 
> > from dom0 using the file method.
> 
> What are you using to back the loop devices? ext3 on local disk?

ext3 on raid1 local disk

> I'm afraid this is a Linux loopback driver issue. It doesn't provide
> back pressure if memory starts getting very dirty. Its actually quite
> hard for it to do as the memory management system can make it hard for
> it to tell.

Yes thats exactly what it looks like.

I did a bit of experimentation with a loopback file mounted domU vs a
real partition domU.  The loopback file mounted domU exhibits the
problem, but the real partition one doesn't.

So it appears to be the loopback driver caching. Ie the /dev/loop ->
file bit rather than the xen -> /dev/loop bit.

I tried a hacking losetup to open the file in O_DIRECT mode, but
unfortunately it makes no difference - all the magic is done in the
kernel anyway :-(

I also had a look at drivers/block/loop.c to see if there was any way
to hack that to make the loop device unbuffered.  This looks plausible
at least but I'm not familiar enough with kernel internals to figure
it out.

> > Would this be less of a problem if we switched over to using 
> > partitions (lvm say)?  We are slightly reluctant to do this 
> > due to previous bad experiences with lvm though!
> 
> LVM avoids the problem.

Noted - thank you.

> We're looking at our own alternatives to the loop driver.

I'm all ears ;-)

Thanks

Nick
-- 
Nick Craig-Wood <nick@xxxxxxxxxxxxxx> -- http://www.craig-wood.com/nick

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>