[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Kernel 3.11 / 3.12 OOM killer and Xen ballooning



On Wed, Jan 29, 2014 at 02:45:24PM +0000, James Dingwall wrote:
> Bob Liu wrote:
> >On 01/29/2014 01:15 AM, James Dingwall wrote:
> >>Bob Liu wrote:
> >>>I have made a patch by reserving extra 10% of original total memory, by
> >>>this way I think we can make the system much more reliably in all cases.
> >>>Could you please have a test? You don't need to set
> >>>selfballoon_reserved_mb by yourself any more.
> >>I have to say that with this patch the situation has definitely
> >>improved.  I have been running it with 3.12.[78] and 3.13 and pushing it
> >>quite hard for the last 10 days or so.  Unfortunately yesterday I got an
> >Good news!
> >
> >>OOM during a compile (link) of webkit-gtk.  I think your patch is part
> >>of the solution but I'm not sure if the other bit is simply to be more
> >>generous with the guest memory allocation or something else.  Having
> >>tested with memory = 512  and no tmem I get an OOM with the same
> >>compile, with memory = 1024 and no tmem the compile completes ok (both
> >>cases without maxmem).  As my domains are usually started with memory =
> >>512 and maxmem = 1024 it seems that there should be sufficient with my
> >But I think from the beginning tmem/balloon driver can't expand guest
> >memory from size 'memory' to 'maxmem' automatically.
> I am carrying this patch for libxl (4.3.1) because maxmem wasn't
> being honoured.

Daniel,

Weren't you working on a similar patch? Do you recall what happend to it?

Thanks.
> 
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index 356f920..fb7965d 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -235,7 +235,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
>      libxl_domain_set_nodeaffinity(ctx, domid, &info->nodemap);
>      libxl_set_vcpuaffinity_all(ctx, domid, info->max_vcpus,
> &info->cpumap);
> 
> -    xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
> LIBXL_MAXMEM_CONSTANT);
> +    xc_domain_setmaxmem(ctx->xch, domid, info->max_memkb +
> LIBXL_MAXMEM_CONSTANT);
>      xs_domid = xs_read(ctx->xsh, XBT_NULL, "/tool/xenstored/domid", NULL);
>      state->store_domid = xs_domid ? atoi(xs_domid) : 0;
>      free(xs_domid);
> 
> >
> >>default parameters. Also for an experiment I set memory=1024 and removed
> >>maxmem and when tmem is activated I see "[ 3393.884105] xen:balloon:
> >>reserve_additional_memory: add_memory() failed: -17" printed many times
> >>in the guest kernel log.
> >>
> >I'll take a look at it.
> It seems possible that this could be the same cause as for the
> message being printed in dom0 and which I reported in
> http://lists.xen.org/archives/html/xen-devel/2012-12/msg01607.html
> and for which no fix seems to have made it to the kernel.  I'm still
> working around this with:
> 
> #!/bin/sh
> 
> CURRENT_KB="/sys/bus/xen_memory/devices/xen_memory0/info/current_kb"
> TARGET_KB="/sys/bus/xen_memory/devices/xen_memory0/target_kb"
> 
> CKB=$(< "${CURRENT_KB}")
> TKB=$(< "${TARGET_KB}")
> 
> if [ "${TKB}" -gt "${CKB}" ] ; then
>         echo "Resizing dom0 memory balloon target to ${CKB}"
>         echo "${CKB}" > "${TARGET_KB}"
> fi
> 
> Thanks,
> James
> 
> 
> -- 
> 
> *James Dingwall*
> 
> Script Monkey
> 
> zynstra-signature-logo <http://www.zynstra.com/>twitter-black
> <http://www.twitter.com/zynstra>linkedin-black
> <http://www.linkedin.com/company/zynstra>
> 
> Zynstra is a private limited company registered in England and Wales
> (registered number 07864369).  Our registered office is 5 New Street
> Square, London, EC4A 3TW and our headquarters are at Bath Ventures,
> Broad Quay, Bath, BA1 1UD.
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.