[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Deletion of big files...
Pavel Machek wrote:
> PS: I could imagine Irix being faster not because asynchrony, but
> because their fs is more effective for this concrete issue.

Linux is horribly slow in this regard. Rob van Nieuwkerk reports 15Mb
per second of "deletion". You can almost fill a modern disk at that

Somehow, rm-ing a large file involves much more IO than what can be
accounted for in a quick calculation:

To free 15Mb of disk space, Linux needs to write 15k bits to
disk. That is 2k bytes. We should be able to do better than 2k per

Indirect and double indirect (*) blocks might need reading. To do 15Mb
per second, we need to read 15k worth of indirect block pointers. That
is 60k per second. We should be able to do better than that....

I don't know what it is doing.

Hmm. Maybe I do....

If we read a 1k indirect block, and then have to seek for the next 1k
block of indirect pointers, then that might explain things: 10ms seek
time, 6 ms avg rotational latency -> 16ms per 1k block -> 60 blocks
per second.

This would mean that we'd need to group the indirect blocks more than
we do now in writing large files.

To test if this theory is close, a prediction:

Delete performance will be almost 16 times better on a filesystem with
4k blocksize than with a 1k blocksize.

I just tested my "fresh out of the box" system (1k blocksize), and it
deletes almost 30Mb per second. Creating the file was done at 7Mb per
second (there is something not completely right with that disk: It
should be able to do double that....)


Roger Wolff.

(*) Double indirect are soooo rare, that they don't figure into the
performance calculation....

** ** ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:51    [W:0.100 / U:2.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site