lkml.org 
[lkml]   [2006]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Recursive chmod/chown OOM kills box with 32MB RAM
    Hi!


    > > >[CCing namesys]
    > > >
    > > >Narrowed it down to 100% reproducible case:
    > > >
    > > > chown -Rc 0:<n> .
    > > >
    > > >in a top directory of tree containing ~21938 files
    > > >on reiser3 partition:
    > > >
    > > > /dev/sdc3 on /.3 type reiserfs (rw,noatime)
    > > >
    > > >causes oom kill storm. "ls -lR", "find ." etc work fine.
    > > >
    > > >I suspected that it is a leak in winbindd libnss module,
    > > >but chown does not seem to grow larger in top, and also
    > > >running it under softlimit -m 400000 still causes oom kills
    > > >while chown's RSS stays below 4MB.
    >
    > In order for the journaled filesystems to make sure the FS is consistent after
    > a crash, we need to keep some blocks in memory until other blocks have been
    > written. These blocks are pinned, and can't be freed until a certain amount
    > of io is done.
    >
    > In the case of reiserfs, it might pin as much as the size of the journal at
    > any time. The default journal is 32MB, which is much too large for a system
    > with only 32MB of ram.
    >
    > You can shrink the log of an existing filesystem. The minimum size is 513
    > blocks, you might try 1024 as a good starting poing.
    >
    > reiserfstune -s 1024 /dev/xxxx
    >
    > The filesystem must be unmounted first.

    Could we refuse to mount filesystem unless journal_size <
    physmem_size/2 or something like that?

    I was not aware of this trap, and it seems unlikely that users know
    about it...
    Pavel
    --
    Thanks, Sharp!
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-02-02 16:07    [W:0.026 / U:32.260 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site