Re: Deletion of big files...

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Mon, 17 May 1999 10:54:04 +0200 (MEST)


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
speed!

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
second....

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....)

Regards,

Roger Wolff.

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

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +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 majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/