lkml.org 
[lkml]   [2009]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: efficient access to "rotational"; new fcntl?
    Date
    Arjan van de Ven wrote:
    > On Sat, 19 Sep 2009 10:01:51 +0200
    > Jim Meyering <jim@meyering.net> wrote:
    >> Yeah, I mentioned I should do exactly that on IRC yesterday.
    >> I've just run some tests, and see that at least with one SSD (OCZ
    >> Summit 120GB), the 0.5s cost of sorting pays off handsomely with a
    >> 12-x speed-up, saving 5.5 minutes, when removing a
    >> 1-million-empty-file directory.
    >>
    >
    > likely because you actually reduce the amount of IO; inodes share
    > disk blocks; repeated unlinks in random order likely write the same
    > block multiple times....

    That makes sense.
    Maybe cache effects, too?

    > btw have you given thought about using threads as part of rm -r[f] ?
    > (would make the unlinks of unrelated directories/files asynchronous)

    While it is certainly a nicely parallelizable process,
    rm usually runs so quickly that I doubt it'd be worthwhile.
    If you know in advance that parallelizing a particular recursive
    removal would give a significant benefit, it's probably best to do it
    via e.g., xargs --max-procs=N.

    However, sort *would* benefit, and some UCLA students implemented that
    for a term project. Unfortunately, the project is stalled because the
    implementation was not efficient enough, and no one has found the
    time to improve it since.


    \
     
     \ /
      Last update: 2009-09-19 11:11    [W:0.021 / U:0.584 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site