[Devel] Re: memrlimit controller merge to mainline
Daisuke Nishimura
nishimura at mxp.nes.nec.co.jp
Tue Jul 29 21:23:23 PDT 2008
On Wed, 30 Jul 2008 10:17:19 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> On Wed, 30 Jul 2008 01:16:17 +0100 (BST)
> Hugh Dickins <hugh at veritas.com> wrote:
>
> > On Tue, 29 Jul 2008, KAMEZAWA Hiroyuki wrote:
> > > On Fri, 25 Jul 2008 17:46:45 +0100 (BST)
> > > Hugh Dickins <hugh at veritas.com> wrote:
> > >
> > > > IIRC Rik expressed the same by pointing out that a cgroup at its
> > > > swap limit would then be forced to grow in mem (until it hits its
> > > > mem limit): so controlling the less precious resource would increase
> > > > pressure on the more precious resource. (Actually, that probably
> > > > bears little relation to what he said - sorry, Rik!) I don't recall
> > > > what answer he got, perhaps I'd be persuaded if I heard it again.
> > > >
> > > Added Nishimura to CC.
> > >
> > > IMHO, from user point of view, both of
> > > - having 2 controls as mem controller + swap controller
> > > - mem + swap controller
> > > doesn't have much difference. The users will use as they like.
> >
> > I'm not suggesting either one of those alternatives.
> >
> > I'm suggesting we have a mem controller (the thing we already have)
> > and a mem+swap controller (which we don't yet have: a controller
> > for the total mem+swap of a cgroup); the mem+swap controller likely
> > making use of much that is in the mem controller, as Paul has said.
> >
> Ah, what mem+swap controller means is limitiing mem+swap by 'a' limit ?
> It's a choice for me. From view of global LRU management, it's better.
> If we can avoid an accident that the swap is fully used by some silly program,
> anything is ok to me.
>
This was the intention of swap controller, and I agree that
anything would be ok if it can avoid these situations.
(snip)
> > > state 4) Run a big program on B.
> > > A...memory_usage=500M swap_usage=700M.
> > > B...memory_usage=1G swap_usage=300M
> > If you believe a swap controller would make that better, what limits
> > do you suggest? If you assign A a swap limit of 700M or above, it
> > changes nothing; if you assign A a swap limit below 700M, it cannot
> > do all the work that it could do in the example.
>
> Of course, set A's swap_limit of 300M and get swap pages into memory and
> free swap entries and make A on memory. (before B starts.)
>
I think so too.
That's why I said before that shrinking should be supported
in swap controller too, so that users (middle ware) can
decrease the swap usage by themselves.
> > > But users think why A uses 700M of swap with 500M of free memory....
> >
> > Because at this time A isn't actively using any of that 700M.
>
> That's a weakness of "do all by automatic detection and ideal algoritm".
> It's just a result of LRU algorithm, which is not always the users think
> ideal.
>
Thanks,
Daisuke Nishimura.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list