lkml.org 
[lkml]   [2009]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH] memcg soft limit (yet another new design) v1
    On Sat, 28 Mar 2009 23:41:00 +0530
    Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

    > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-27 13:59:33]:
    >
    > > ==brief test result==
    > > On 2CPU/1.6GB bytes machine. create group A and B
    > > A. soft limit=300M
    > > B. no soft limit
    > >
    > > Run a malloc() program on B and allcoate 1G of memory. The program just
    > > sleeps after allocating memory and no memory refernce after it.
    > > Run make -j 6 and compile the kernel.
    > >
    > > When vm.swappiness = 60 => 60MB of memory are swapped out from B.
    > > When vm.swappiness = 10 => 1MB of memory are swapped out from B
    > >
    > > If no soft limit, 350MB of swap out will happen from B.(swapiness=60)
    > >
    >
    > I ran the same tests, booted the machine with mem=1700M and maxcpus=2
    >
    with your patch ?

    > Here is what I see with
    >
    > A has a swapout of 344M and B has not swapout at all, since B is
    > always under its soft limit. vm.swappiness is set to 60
    >
    > I think the above is more along the lines of the expected functional behaviour.
    >

    yes. but it's depend on workload (and fortune?) of A in this implementation.
    Follwing is what I think now. We need some changes to vmscanc, later.

    explain)
    This patch rotate memcg's page to the top of LRU. But, LRU is divided into
    INACTIVE/ACTIVE. So, sometimes, memcg's INACTIVE LRU can be empty and
    pages from other group can be reclaimed.
    In my test, group A's RSS usage can be 1-2M sometimes.

    Thanks,
    -Kame









    \
     
     \ /
      Last update: 2009-03-31 01:59    [W:0.026 / U:0.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site