All of lore.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: Processes writing large files in memory-limited LXC container are killed by OOM
@ 2013-06-25  5:45 Aaron Staley
       [not found] ` <CAMcjixYa-mjo5TrxmtBkr0MOf+8r_iSeW5MF4c8nJKdp5m+RPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Aaron Staley @ 2013-06-25  5:45 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: Paul Menage, Li Zefan

This is better explained here:
http://serverfault.com/questions/516074/why-are-applications-in-a-memory-limited-lxc-container-writing-large-files-to-di
(The
highest-voted answer believes this to be a kernel bug.)

Summary: I have set up a system where I am using LXC to create multiple
virtualized containers on my system with limited resources. Unfortunately, I'm
running into a troublesome scenario where the OOM killer is hard killing
processes in my LXC container when I write a file with size exceeding the
memory limitation (set to 300MB). There appears to be some issue with the
file buffering respecting the containers memory limit.


Reproducing:

/done on a c1.xlarge instance running on Amazon EC2

Create 6 empty lxc containers (in my case I did lxc-create -n testcon -t
ubuntu -- -r precise)

Modify the configuration of each container to set lxc.cgroup.memory.
limit_in_bytes = 300M

Within each container run:
dd if=/dev/zero of=test2 bs=100k count=5010
parallel

This will with high probability activate the OOM (as seen in demsg); often
the dd processes themselves will be killed.

This has been verified to have problems on:
Linux 3.8.0-25-generic #37-Ubuntu SMP and Linux ip-10-8-139-98
3.2.0-29-virtual #46-Ubuntu SMP Fri Jul 27 17:23:50 UTC 2012 x86_64 x86_64
x86_64 GNU/Linux

Please let me know your thoughts.

Regards,
Aaron Staley

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-07-02 12:42 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25  5:45 PROBLEM: Processes writing large files in memory-limited LXC container are killed by OOM Aaron Staley
     [not found] ` <CAMcjixYa-mjo5TrxmtBkr0MOf+8r_iSeW5MF4c8nJKdp5m+RPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-25 13:24   ` Serge Hallyn
2013-06-25 20:54     ` Aaron Staley
     [not found]       ` <CAMcjixZtW0KdAmLXyDoGFqL2qh4aEgdGjBYJWrPESFMz0dvELw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-27  5:12         ` Zhu Yanhai
     [not found]           ` <CAC8teKXNof5PdU2dMz4iZ8tM=Dx=aZ0efxotDhdc-xopeK-+Xg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-27  5:19             ` Aaron Staley
     [not found]               ` <CAMcjixZdXWGezcVQPPo3M0yNBx4TtbiOoqYJQWvNbTyqULifUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-27 20:51                 ` Aristeu Rozanski
2013-07-01 15:21                 ` Serge Hallyn
2013-07-01 15:27                   ` Aaron Staley
2013-06-28 18:52         ` Serge E. Hallyn
2013-07-01 18:01   ` Serge Hallyn
2013-07-01 18:01     ` Serge Hallyn
2013-07-01 18:01     ` Serge Hallyn
2013-07-01 18:45     ` Johannes Weiner
2013-07-01 18:45     ` Johannes Weiner
2013-07-01 18:45       ` Johannes Weiner
2013-07-01 18:51       ` Aaron Staley
     [not found]       ` <20130701184503.GG17812-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2013-07-01 18:51         ` Aaron Staley
2013-07-01 19:02         ` Serge Hallyn
2013-07-01 19:02           ` Serge Hallyn
2013-07-01 19:02           ` Serge Hallyn
2013-07-02 12:42           ` Michal Hocko
2013-07-02 12:42             ` Michal Hocko
2013-07-02 12:42             ` Michal Hocko

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.