[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/26 Daniel Lezcano > KAMEZAWA Hiroyuki wrote: > >> On Mon, 24 Aug 2009 16:11:15 +0200 >> Daniel Lezcano wrote: >> >> >> >>> [ snip ] >>> >>> i think that /proc/meminfo should be mounted after /proc . why? i think >> that, because mounting /proc may override /proc/meminfo >> Am

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/26 Krzysztof Taraszka > 2009/8/26 Daniel Lezcano > >> KAMEZAWA Hiroyuki wrote: >> >>> On Mon, 24 Aug 2009 16:11:15 +0200 >>> Daniel Lezcano wrote: >>> >>> >>> [ snip ] > i think that /proc/meminfo should be mounted after /proc . why? i >>> think >>> that, beca

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Krzysztof Taraszka > > > 2009/8/24 Krzysztof Taraszka > > 2009/8/24 Daniel Lezcano >> >>> Krzysztof Taraszka wrote: >>> 2009/8/24 Daniel Lezcano > [ snip ] > > i think that /proc/meminfo should be mounted after /proc . why? i >> think >> >>> t

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Krzysztof Taraszka > 2009/8/24 Daniel Lezcano > >> Krzysztof Taraszka wrote: >> >>> 2009/8/24 Daniel Lezcano >>> >>> [ snip ] i think that /proc/meminfo should be mounted after /proc . why? i > think > >> that, because mounting /proc may override /proc/mem

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >>> [ snip ] >>> >>> i think that /proc/meminfo should be mounted after /proc . why? i think > that, because mounting /proc may override /proc/meminfo >> Am I right? :) >> >> >> >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >> >>> Krzysztof Taraszka wrote: >>> >>> >>> 2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > > > > > >> 2009/8/24 Daniel Lezcano >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > > > [ snip ] > >> i think that /proc/meminfo should be mounted after /proc . why? i think that, because mounting /proc may override /proc/meminfo Am I right? :) >>> Ha ! haha ! arrgh ! no way ! You are right :/ >>> >>> >>> >> >> Hehe ;) >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >> >>> Krzysztof Taraszka wrote: >>> >>> >>> 2009/8/24 Daniel Lezcano Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > > >> (...) >> >> >> >

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Daniel Lezcano (...) > With the lxc tools I did: > >lxc-execute -n foo /bin/bash >echo 268435456 > /cgroup/foo/memory.limit_in_bytes >mount --bind /cgroup/foo/memory.meminfo /proc/meminfo >for i in $(seq 1 100); do sleep 3600 & done (...) > > :) > >

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >> >>> Krzysztof Taraszka wrote: >>> >>> >>> 2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > > > > > >> 2009/8/24 Daniel Lezcano >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
I added the swap resource monitoring to your patch. I did it in the very simple way, because if: memsw = swap + mem, then swap_in_use == memsw.usage_in_bytes - memory.usage_in_bytes simple patch: +static int mem_cgroup_meminfo(struct cgroup *cgrp, struct cftype *cft, +

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >> >>> Krzysztof Taraszka wrote: >>> >>> >>> 2009/8/24 Daniel Lezcano Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > > >> (...) >> >> >> >

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/23 Daniel Lezcano >> >> (...) >> >> >> >> >>> With the lxc tools I did: >>> >>> lxc-execute -n foo /bin/bash >>> echo 268435456 > /cgroup/foo/memory.limit_in_bytes >>> mount --bind /cgroup/foo/memory.meminfo /proc

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> >> >>> Krzysztof Taraszka wrote: >>> >>> >>> 2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > > > > > >> 2009/8/24 Daniel Lezcano >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/24 Daniel Lezcano >> >> Krzysztof Taraszka wrote: >>> >>> 2009/8/23 Daniel Lezcano (...) With the lxc tools I did: > > lxc-execute -n foo /bin/bash > echo 268435456 > /cg

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
:) excelent :) my ugly patch printing right now undefinied data but the idea was the same :) how about memsw_limit for swap? :> I am looking for swap usage statistics from cgroup right now from memcontrol.c :) but as you did the idea is good and should be add to the kernel and lxc-tools :) 2009/

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/24 KAMEZAWA Hiroyuki > On Sun, 23 Aug 2009 23:12:24 +0200 > Krzysztof Taraszka wrote: > > > :) excelent :) > > > > my ugly patch printing right now undefinied data but the idea was the > same > > :) > > how about memsw_limit for swap? :> > > I am looking for swap usage statistics from cgr

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Krzysztof Taraszka > > > 2009/8/23 Daniel Lezcano > >> Krzysztof Taraszka wrote: >> >>> 2009/8/23 Daniel Lezcano >>> >>> Krzysztof Taraszka wrote: Hello, > > I am running lxc on my debian unstable sandbox and I have a few > question > about memory managamen

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/23 Krzysztof Taraszka >> >> >> >>> 2009/8/23 Krzysztof Taraszka >>> >>> >>> 2009/8/23 Daniel Lezcano > Krzysztof Taraszka wrote: > > > >> 2009/8/23 Daniel Lezcano >> >> Krzysztof

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Krzysztof Taraszka > 2009/8/23 Krzysztof Taraszka > >> >> >> 2009/8/23 Daniel Lezcano >> >>> Krzysztof Taraszka wrote: >>> 2009/8/23 Daniel Lezcano Krzysztof Taraszka wrote: > > Hello, >> >> I am running lxc on my debian unstable sandbox and I have a

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Daniel Lezcano > Krzysztof Taraszka wrote: > >> 2009/8/23 Daniel Lezcano >> >> Krzysztof Taraszka wrote: >>> >>> Hello, I am running lxc on my debian unstable sandbox and I have a few question about memory managament inside linux containers based on lxc project. >

[Devel] Re: [lxc-devel] Memory Resources

2009-09-02 Thread Krzysztof Taraszka
2009/8/23 Daniel Lezcano > Krzysztof Taraszka wrote: > >> Hello, >> >> I am running lxc on my debian unstable sandbox and I have a few question >> about memory managament inside linux containers based on lxc project. >> >> I have got linux kernel 2.6.30.5 with enabled : >> >> +Resource counter >>

[Devel] Re: [lxc-devel] Memory Resources

2009-09-01 Thread Daniel Lezcano
Serge E. Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): > >> Serge E. Hallyn wrote: >> The idea of Kamezawa-san to use a fuse proc is maybe a good idea in this case. So we can address the entire /proc specific informations. For >>> I a

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Serge E. Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > Serge E. Hallyn wrote: >>> The idea of Kamezawa-san to use a fuse proc is maybe a good idea in >>> this case. So we can address the entire /proc specific informations. >>> For >> >> I agree, nice idea. And hopefully pretty simple to whip

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Daniel Lezcano
Daniel Lezcano wrote: > Serge E. Hallyn wrote: > >> Quoting Daniel Lezcano (daniel.lezc...@free.fr): >> >> >>> Serge E. Hallyn wrote: >>> >>> Quoting Daniel Lezcano (daniel.lezc...@free.fr): > Krzysztof Taraszka wrote: > >>>

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Daniel Lezcano
Serge E. Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): > >> Serge E. Hallyn wrote: >> >>> Quoting Daniel Lezcano (daniel.lezc...@free.fr): >>> >>> Krzysztof Taraszka wrote: > Okey. > I made few tests and this two ways work: >

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Serge E. Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > Serge E. Hallyn wrote: >> Quoting Daniel Lezcano (daniel.lezc...@free.fr): >> >>> Krzysztof Taraszka wrote: >>> Okey. I made few tests and this two ways work: First way: === lxc. smack enabled, policy loade

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Daniel Lezcano
Serge E. Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): > >> Krzysztof Taraszka wrote: >> >>> Okey. >>> I made few tests and this two ways work: >>> >>> First way: >>> === >>> lxc. smack enabled, policy loaded. cgroup not labeled. >>> >>> a) start container >>> b) moun

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Serge E. Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > Krzysztof Taraszka wrote: > > Okey. > > I made few tests and this two ways work: > > > > First way: > > === > > lxc. smack enabled, policy loaded. cgroup not labeled. > > > > a) start container > > b) mount cgroup inside container > > c) mount

[Devel] RE: [lxc-devel] Memory Resources

2009-08-31 Thread Dietmar Maurer
> Yep, interesting and maybe a solution for the application containers. > In the case of the system container, that will be the distro scripts > which will mount the /proc directory with the usual mount options. The > objective is to avoid to modify the distro scripts and let them do the > work, li

[Devel] Re: [lxc-devel] Memory Resources

2009-08-31 Thread Daniel Lezcano
KAMEZAWA Hiroyuki wrote: > On Fri, 28 Aug 2009 11:32:56 +0200 > Daniel Lezcano wrote: > >>> steps: b, c, d can be done inside lxc tools. step a can't and it is base on >>> the admin policy. >>> >>> I think that the first solution is more automatic and can be done by lxc >>> tools (maybe command

[Devel] Re: [lxc-devel] Memory Resources

2009-08-30 Thread KAMEZAWA Hiroyuki
On Fri, 28 Aug 2009 11:32:56 +0200 Daniel Lezcano wrote: > > steps: b, c, d can be done inside lxc tools. step a can't and it is base on > > the admin policy. > > > > I think that the first solution is more automatic and can be done by lxc > > tools (maybe command line switch? I can prepare a patc

[Devel] Re: [lxc-devel] Memory Resources

2009-08-28 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/26 Krzysztof Taraszka > > >> 2009/8/26 Daniel Lezcano >> >> >>> KAMEZAWA Hiroyuki wrote: >>> >>> On Mon, 24 Aug 2009 16:11:15 +0200 Daniel Lezcano wrote: > [ snip ] > > > >> i

[Devel] Re: [lxc-devel] Memory Resources

2009-08-26 Thread Daniel Lezcano
KAMEZAWA Hiroyuki wrote: > On Mon, 24 Aug 2009 16:11:15 +0200 > Daniel Lezcano wrote: > > >> [ snip ] >> > i think that /proc/meminfo should be mounted after /proc . why? i think > that, because mounting /proc may override /proc/meminfo > Am I right? :) > > >

[Devel] Re: [lxc-devel] Memory Resources

2009-08-25 Thread KAMEZAWA Hiroyuki
On Mon, 24 Aug 2009 16:11:15 +0200 Daniel Lezcano wrote: > > > [ snip ] > >>> i think that /proc/meminfo should be mounted after /proc . why? i think > >>> that, because mounting /proc may override /proc/meminfo > >>> Am I right? :) > >>> > >>> > >>> > >> Ha ! haha ! arrgh ! no way ! You

Re: [Devel] Re: [lxc-devel] Memory Resources

2009-08-25 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2009-08-24 16:18:25]: > On Mon, 24 Aug 2009 12:47:57 +0530 > Balbir Singh wrote: > > > * KAMEZAWA Hiroyuki [2009-08-24 15:58:35]: > > > > > On Mon, 24 Aug 2009 08:17:06 +0200 > > > Dietmar Maurer wrote: > > > > > > > > > how about memsw_limit for swap? :> > > > > > > I

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > >> >> [ snip ] >> >>> i think that /proc/meminfo should be mounted after /proc . why? i think > that, because mounting /proc may override /proc/meminfo > Am I right? :) > > > > Ha ! haha ! arrgh ! no way ! You ar

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
[ snip ] i think that /proc/meminfo should be mounted after /proc . why? i think that, because mounting /proc may override /proc/meminfo Am I right? :) Ha ! haha ! arrgh ! no way ! You are right :/ Hehe ;) In the case of application container, lxc mounts /proc but in the

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > > >> Krzysztof Taraszka wrote: >> >> >>> 2009/8/24 Daniel Lezcano >>> >>> >>> >>> Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > > > > > > >>

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > > >> Krzysztof Taraszka wrote: >> >> >>> 2009/8/24 Daniel Lezcano >>> >>> >>> >>> Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > > Krzysztof Taraszka wrote: > > >>

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > > >> Krzysztof Taraszka wrote: >> >> >>> 2009/8/24 Daniel Lezcano >>> >>> Krzysztof Taraszka wrote: >>> 2009/8/23 Daniel Lezcano > (...) > > > > > With the lxc tools I did: >

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/24 Daniel Lezcano > >> Krzysztof Taraszka wrote: >> >>> 2009/8/23 Daniel Lezcano >>> >>> (...) >>> >>> >>> >>> With the lxc tools I did: lxc-execute -n foo /bin/bash echo 268435456 > /cgroup/foo/memory.limit_in_bytes m

[Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > > (...) > > > >> With the lxc tools I did: >> >>lxc-execute -n foo /bin/bash >>echo 268435456 > /cgroup/foo/memory.limit_in_bytes >>mount --bind /cgroup/foo/memory.meminfo /proc/meminfo >>for i in $(seq 1 100

Re: [Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread KAMEZAWA Hiroyuki
On Mon, 24 Aug 2009 12:47:57 +0530 Balbir Singh wrote: > * KAMEZAWA Hiroyuki [2009-08-24 15:58:35]: > > > On Mon, 24 Aug 2009 08:17:06 +0200 > > Dietmar Maurer wrote: > > > > > > > how about memsw_limit for swap? :> > > > > > I am looking for swap usage statistics from cgroup right now from >

Re: [Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2009-08-24 15:58:35]: > On Mon, 24 Aug 2009 08:17:06 +0200 > Dietmar Maurer wrote: > > > > > how about memsw_limit for swap? :> > > > > I am looking for swap usage statistics from cgroup right now from > > > > memcontrol.c :) but as you did the idea is good and should be ad

Re: [Devel] Re: [lxc-devel] Memory Resources

2009-08-24 Thread KAMEZAWA Hiroyuki
On Mon, 24 Aug 2009 08:17:06 +0200 Dietmar Maurer wrote: > > > how about memsw_limit for swap? :> > > > I am looking for swap usage statistics from cgroup right now from > > > memcontrol.c :) but as you did the idea is good and should be add to > > the > > > kernel and lxc-tools :) > > > > > > >

RE: [Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread Dietmar Maurer
> > how about memsw_limit for swap? :> > > I am looking for swap usage statistics from cgroup right now from > > memcontrol.c :) but as you did the idea is good and should be add to > the > > kernel and lxc-tools :) > > > > Hmm, why meminfo is necessary ? For cheating top/free/... etc ? Many serv

[Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread KAMEZAWA Hiroyuki
On Sun, 23 Aug 2009 23:12:24 +0200 Krzysztof Taraszka wrote: > :) excelent :) > > my ugly patch printing right now undefinied data but the idea was the same > :) > how about memsw_limit for swap? :> > I am looking for swap usage statistics from cgroup right now from > memcontrol.c :) but as you

[Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > >> Krzysztof Taraszka wrote: >> >>> 2009/8/23 Krzysztof Taraszka >>> >>> >>> 2009/8/23 Krzysztof Taraszka > 2009/8/23 Daniel Lezcano > > > >> Krzysztof Taraszka wrote: >> >> >> >>> 20

[Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/23 Krzysztof Taraszka > > >> 2009/8/23 Krzysztof Taraszka >> >> >>> 2009/8/23 Daniel Lezcano >>> >>> Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > > Krzysztof Taraszka wrote: > >>

[Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > 2009/8/23 Daniel Lezcano > >> Krzysztof Taraszka wrote: >> >>> Hello, >>> >>> I am running lxc on my debian unstable sandbox and I have a few question >>> about memory managament inside linux containers based on lxc project. >>> >>> I have got linux kernel 2.6.30.5 wit

[Devel] Re: [lxc-devel] Memory Resources

2009-08-23 Thread Daniel Lezcano
Krzysztof Taraszka wrote: > Hello, > > I am running lxc on my debian unstable sandbox and I have a few question > about memory managament inside linux containers based on lxc project. > > I have got linux kernel 2.6.30.5 with enabled : > > +Resource counter > ++ Memory Resource Controller for Co