Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-17 Thread Vladimir Davydov
Hi Johannes, On Mon, Sep 15, 2014 at 03:14:35PM -0400, Johannes Weiner wrote: > > Finally, my understanding (may be crazy!) how the things should be > > configured. Just like now, there should be mem_cgroup->res accounting > > and limiting total user memory (cache+anon) usage for processes inside

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-15 Thread Kamezawa Hiroyuki
(2014/09/16 4:14), Johannes Weiner wrote: Hi Vladimir, On Thu, Sep 04, 2014 at 06:30:55PM +0400, Vladimir Davydov wrote: To sum it up, the current mem + memsw configuration scheme doesn't allow us to limit swap usage if we want to partition the system dynamically using soft limits. Actually, it

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-15 Thread Johannes Weiner
Hi Vladimir, On Thu, Sep 04, 2014 at 06:30:55PM +0400, Vladimir Davydov wrote: > To sum it up, the current mem + memsw configuration scheme doesn't allow > us to limit swap usage if we want to partition the system dynamically > using soft limits. Actually, it also looks rather confusing to me. We

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-11 Thread Vladimir Davydov
On Thu, Sep 11, 2014 at 05:53:56PM +0900, Kamezawa Hiroyuki wrote: > (2014/09/11 17:23), Vladimir Davydov wrote: > >For example, there are two cgroups, one having a huge soft limit excess > >and full of anon memory and another not exceeding its soft limit but > >using primarily clean file caches. T

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-11 Thread Kamezawa Hiroyuki
(2014/09/11 17:23), Vladimir Davydov wrote: On Thu, Sep 11, 2014 at 11:04:41AM +0900, Kamezawa Hiroyuki wrote: (2014/09/09 19:39), Vladimir Davydov wrote: For your purpose, you need to implement your method in system-wide way. It seems crazy to set per-cgroup-anon-limit for avoding system-wide

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-11 Thread Vladimir Davydov
On Thu, Sep 11, 2014 at 11:04:41AM +0900, Kamezawa Hiroyuki wrote: > (2014/09/09 19:39), Vladimir Davydov wrote: > > >>For your purpose, you need to implement your method in system-wide way. > >>It seems crazy to set per-cgroup-anon-limit for avoding system-wide-oom. > >>You'll need help of system

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-11 Thread Vladimir Davydov
On Thu, Sep 11, 2014 at 10:22:51AM +0900, Kamezawa Hiroyuki wrote: > (2014/09/10 21:01), Vladimir Davydov wrote: > >On Mon, Sep 08, 2014 at 10:53:48PM +0900, Kamezawa Hiroyuki wrote: > >>(2014/09/08 20:01), Vladimir Davydov wrote: > >>>On Sat, Sep 06, 2014 at 08:15:44AM +0900, Kamezawa Hiroyuki wro

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-10 Thread Kamezawa Hiroyuki
(2014/09/09 19:39), Vladimir Davydov wrote: For your purpose, you need to implement your method in system-wide way. It seems crazy to set per-cgroup-anon-limit for avoding system-wide-oom. You'll need help of system-wide-cgroup-configuration-middleware even if you have a method in a cgroup. If y

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-10 Thread Kamezawa Hiroyuki
(2014/09/10 21:01), Vladimir Davydov wrote: On Mon, Sep 08, 2014 at 10:53:48PM +0900, Kamezawa Hiroyuki wrote: (2014/09/08 20:01), Vladimir Davydov wrote: On Sat, Sep 06, 2014 at 08:15:44AM +0900, Kamezawa Hiroyuki wrote: As you noticed, hitting anon+swap limit just means oom-kill. My point is

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-10 Thread Vladimir Davydov
On Mon, Sep 08, 2014 at 10:53:48PM +0900, Kamezawa Hiroyuki wrote: > (2014/09/08 20:01), Vladimir Davydov wrote: > >On Sat, Sep 06, 2014 at 08:15:44AM +0900, Kamezawa Hiroyuki wrote: > >>As you noticed, hitting anon+swap limit just means oom-kill. > >>My point is that using oom-killer for "server m

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-09 Thread Vladimir Davydov
On Mon, Sep 08, 2014 at 10:53:48PM +0900, Kamezawa Hiroyuki wrote: > (2014/09/08 20:01), Vladimir Davydov wrote: > >But OK, you don't like OOM on hitting anon+swap limit and propose to > >introduce a kind of userspace notification instead, but the problem > >actually isn't *WHAT* we should do on hi

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-08 Thread Kamezawa Hiroyuki
(2014/09/08 20:01), Vladimir Davydov wrote: On Sat, Sep 06, 2014 at 08:15:44AM +0900, Kamezawa Hiroyuki wrote: As you noticed, hitting anon+swap limit just means oom-kill. My point is that using oom-killer for "server management" just seems crazy. Let my clarify things. your proposal was. 1.

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-08 Thread Vladimir Davydov
On Sat, Sep 06, 2014 at 08:15:44AM +0900, Kamezawa Hiroyuki wrote: > As you noticed, hitting anon+swap limit just means oom-kill. > My point is that using oom-killer for "server management" just seems crazy. > > Let my clarify things. your proposal was. > 1. soft-limit will be a main feature for

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-05 Thread Kamezawa Hiroyuki
(2014/09/06 1:00), Vladimir Davydov wrote: On Fri, Sep 05, 2014 at 11:20:43PM +0900, Kamezawa Hiroyuki wrote: Basically, I don't like OOM Kill. Anyone don't like it, I think. In recent container use, application may be build as "stateless" and kill-and-respawn may not be problematic, but I thin

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-05 Thread Vladimir Davydov
On Fri, Sep 05, 2014 at 11:20:43PM +0900, Kamezawa Hiroyuki wrote: > Basically, I don't like OOM Kill. Anyone don't like it, I think. > > In recent container use, application may be build as "stateless" and > kill-and-respawn may not be problematic, but I think killing "a" process > by oom-kill is

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-05 Thread Kamezawa Hiroyuki
(2014/09/05 17:28), Vladimir Davydov wrote: Hi Kamezawa, Thanks for reading this :-) On Fri, Sep 05, 2014 at 07:03:57AM +0900, Kamezawa Hiroyuki wrote: (2014/09/04 23:30), Vladimir Davydov wrote: - memory.limit - container can't use memory above this - memory.memsw.limit - container can't

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-05 Thread Vladimir Davydov
Hi Kamezawa, Thanks for reading this :-) On Fri, Sep 05, 2014 at 07:03:57AM +0900, Kamezawa Hiroyuki wrote: > (2014/09/04 23:30), Vladimir Davydov wrote: > > - memory.limit - container can't use memory above this > > - memory.memsw.limit - container can't use swappable memory above this > > If

Re: [RFC] memory cgroup: my thoughts on memsw

2014-09-04 Thread Kamezawa Hiroyuki
(2014/09/04 23:30), Vladimir Davydov wrote: Hi, Over its long history the memory cgroup has been developed rapidly, but rather in a disordered manner. As a result, today we have a bunch of features that are practically unusable and wants redesign (soft limits) or even not working (kmem accountin

[RFC] memory cgroup: my thoughts on memsw

2014-09-04 Thread Vladimir Davydov
Hi, Over its long history the memory cgroup has been developed rapidly, but rather in a disordered manner. As a result, today we have a bunch of features that are practically unusable and wants redesign (soft limits) or even not working (kmem accounting), not talking about the messy user interface