From: James Dingwall <james.dingwall@zynstra.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Kernel 3.11 / 3.12 OOM killer and Xen ballooning
Date: Tue, 10 Dec 2013 14:52:22 +0000 [thread overview]
Message-ID: <52A72AA6.6010401@zynstra.com> (raw)
In-Reply-To: <52A73283020000780010BE04@nat28.tlf.novell.com>
Jan Beulich wrote:
>>>> On 10.12.13 at 15:01, James Dingwall <james.dingwall@zynstra.com> wrote:
>> Jan Beulich wrote:
>>>>>> On 09.12.13 at 18:50, James Dingwall <james.dingwall@zynstra.com> wrote:
>>>> Since 3.11 I have noticed that the OOM killer quite frequently triggers
>>>> in my Xen guest domains which use ballooning to increase/decrease their
>>>> memory allocation according to their requirements. One example domain I
>>>> have has a maximum memory setting of ~1.5Gb but it usually idles at
>>>> ~300Mb, it is also configured with 2Gb swap which is almost 100% free.
>>>>
>>>> # free
>>>> total used free shared buffers cached
>>>> Mem: 272080 248108 23972 0 1448 63064
>>>> -/+ buffers/cache: 183596 88484
>>>> Swap: 2097148 8 2097140
>>>>
>>>> There is plenty of available free memory in the hypervisor to balloon to
>>>> the maximum size:
>>>> # xl info | grep free_mem
>>>> free_memory : 14923
>>> But you don't tell us how you trigger the process of re-filling
>>> memory. Yet that's the crucial point here; the fact that there is
>>> enough memory available in the hypervisor is only a necessary
>>> prerequisite.
>> My guest systems are Gentoo based and most often the problems happen
>> while running emerge (Python script). The example trace was taken from
>> an emerge command launched via a cron script which runs emerge --sync ;
>> emerge --deep --newuse -p -u world. Almost all the other times I have
>> seen the behaviour have been during emerge --deep --newuse -u world
>> runs, most often during the build of large packages such as kdelibs,
>> seamonkey or libreoffice. However occasionally I have seen it with
>> smaller builds or during the package merge phase where files are indexed
>> and copied in to the live filesystem.
> I don't think I understand what you're trying to tell me, or in what
> way this answers the question.
>
>> I have done some testing with the program below which successfully fills
>> all memory and swap before being killed. One thought I had was that
>> perhaps there was some issue around a balloon down/up when the rate at
>> which memory is being requested and released is high. I will try
>> another program with a random pattern of malloc/free to see if I can
>> make a test case to help with a bisect.
> Again - the question is not how to drive your system out of
> memory, but what entity (if any) it is that is supposed to react on
> memory becoming tight and triggering the balloon driver to re-
> populate pages. One such thing could be xenballoond (which is
> gone in the unstable tree, i.e. what is to become 4.4).
>
> Jan
Sorry, I misunderstood the question. I'm just relying on the built in
kernel behaviour to balloon up/down as and when memory is required I
wasn't aware there were multiple ways that this could be achieved. I'm
not running anything in user space, so does tmem answer the question?
When I modprobe tmem the kernel logs:
[ 18.518714] xen:tmem: frontswap enabled, RAM provided by Xen
Transcendent Memory
[ 18.518739] xen:tmem: cleancache enabled, RAM provided by Xen
Transcendent Memory
[ 18.518741] xen_selfballoon: Initializing Xen selfballooning driver
[ 18.518742] xen_selfballoon: Initializing frontswap selfshrinking driver
The kernel command line for dom0 and domU contains tmem, the command
line for xen contains tmem tmem_dedup=on tmem_compress=on
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.
next prev parent reply other threads:[~2013-12-10 14:52 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 17:50 Kernel 3.11 / 3.12 OOM killer and Xen ballooning James Dingwall
2013-12-09 21:48 ` Konrad Rzeszutek Wilk
2013-12-10 14:52 ` James Dingwall
2013-12-10 15:27 ` Konrad Rzeszutek Wilk
2013-12-11 7:22 ` Bob Liu
2013-12-11 9:25 ` James Dingwall
2013-12-11 9:54 ` Bob Liu
2013-12-11 10:16 ` James Dingwall
2013-12-11 16:30 ` James Dingwall
2013-12-12 1:03 ` Bob Liu
2013-12-13 16:59 ` James Dingwall
2013-12-17 6:11 ` Bob Liu
2013-12-18 12:04 ` Bob Liu
2013-12-19 19:08 ` James Dingwall
2013-12-20 3:17 ` Bob Liu
2013-12-20 12:22 ` James Dingwall
2013-12-26 8:42 ` James Dingwall
2014-01-02 6:25 ` Bob Liu
2014-01-07 9:21 ` James Dingwall
2014-01-09 10:48 ` Bob Liu
2014-01-09 10:54 ` James Dingwall
2014-01-09 11:04 ` James Dingwall
2014-01-15 8:49 ` James Dingwall
2014-01-15 14:41 ` Bob Liu
2014-01-15 16:35 ` James Dingwall
2014-01-16 1:22 ` Bob Liu
2014-01-16 10:52 ` James Dingwall
2014-01-28 17:15 ` James Dingwall
2014-01-29 14:35 ` Bob Liu
2014-01-29 14:45 ` James Dingwall
2014-01-31 16:56 ` Konrad Rzeszutek Wilk
2014-02-03 9:49 ` Daniel Kiper
2014-02-03 10:30 ` Konrad Rzeszutek Wilk
2014-02-03 11:20 ` James Dingwall
2014-02-03 14:00 ` Daniel Kiper
2013-12-10 8:16 ` Jan Beulich
2013-12-10 14:01 ` James Dingwall
2013-12-10 14:25 ` Jan Beulich
2013-12-10 14:52 ` James Dingwall [this message]
2013-12-10 14:59 ` Jan Beulich
2013-12-10 15:16 ` James Dingwall
-- strict thread matches above, loose matches on Subject: below --
2013-11-21 11:28 James Dingwall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A72AA6.6010401@zynstra.com \
--to=james.dingwall@zynstra.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.