lkml.org 
[lkml]   [2009]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Memory overcommit
    David Rientjes wrote:

    > There's advantages to either approach, but it depends on the contextual
    > goal of the oom killer when it's called: kill a rogue task that is
    > allocating more memory than expected,

    But it is wrong at counting allocated memory!
    Come on, it kills /usr/lib/icedove/run-mozilla.sh. Parent, a shell
    script, instead of its child(s) which allocated memory. Look, "test"
    allocates some (0.1GB) memory, and you have:

    % cat test.sh

    #!/bin/sh
    ./test&
    ./test&
    ./test&
    ./test

    % perl check_badness.pl|sort -n|g test

    26511 7884 test
    26511 7885 test
    26511 7886 test
    26511 7887 test
    53994 7883 test.sh

    // great, so test.sh "is" the bad ass, ok, emulate OOMK:

    % kill -9 7883

    // did we kill "a rogue task"

    % perl check_badness.pl|sort -n|g test

    26511 7884 test
    26511 7885 test
    26511 7886 test
    26511 7887 test

    // nooo, they are still alive and eating our memory!

    QED by newbie. ;)

    > or kill a task that will free the most memory.

    .



    \
     
     \ /
      Last update: 2009-10-28 01:11    [W:0.039 / U:90.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site