Re: fsync on large files

Stephen C. Tweedie (sct@redhat.com)
Mon, 8 Feb 1999 16:57:40 GMT


Hi,

On Thu, 4 Feb 1999 15:54:27 +0100, jens@pinguin.conetix.de said:

> Might this be related to my Linux 2.1.131ac10 needing >10sec for deleting a
> ~700 MB file on a 4.3GB ext2fs partition?
> (during which this partition is blocked - even "ls" stops)

No, that's unrelated to fsync. At least part of the rm behaviour is
simply due to the huge amount of random-access data which the kernel
needs to read in during the delete: on a 1K filesystem there is one
block of pointer indirection information for every 256 blocks of file
content, so deleting a 700MB file has to complete nearly 3000 read IOs
with a seek between each one just to locate all of the file's data. On
any Unix-style filesystem, that will be expensive.

Planned for 2.3's btree extensions for ext2 is the ability to compress
the indirection information for continuous runs of blocks on disk, which
will substantially improve the delete performance for these large files.

--Stephen

-
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/