Re: Fragments in Ext2 fs

Michael K. Johnson (johnsonm@nigel.vnet.net)
Mon, 17 Jul 1995 21:59:17 -0500


"Leonard N. Zubkoff" writes:
>While I agree with your first two points, some recent measurements I've made
>show that a 1K block size EXT2 file system performs significantly worse than a
>4K block size file system in sustained write or read performance. In one 200MB
>example, I could only achieve 3326700 bytes/second write and 2602571
>bytes/second read to/from a 1K file system, whereas the same test run on the
>same partition but formatted for 4K blocks can sustain 4602045 bytes/second
>write and 3850811 bytes/second read. For reference, using the same unformatted
>partition produces 4881638 bytes/second write and 3654211 bytes/second read.
>
>This leads me to conclude that we are paying a significant penalty for using 1K
>blocks, and therefore a file system with 8K blocks and 1K fragments might be a
>big win. As disks keep getting faster, I suspect the management of 1K blocks
>in the buffer cache is becoming a limiting factor in certain kinds of I/O
>performance.

Have you checked to make sure that the clustering is really working
in the 1K cases? Larry McVoy told me some time ago when I talked to
him about this subject that he had added a system call to use to
check to see if any clustering was happening, and he didn't see a
single instance of it actually happening.

I seem to recall that benchmarks made in the early days of the clustering
patches made against 4KB blocks that were virtually indistinguishable
from those made with 1KB blocks. Since this doesn't agree with your
benchmarks, it seems that before thinking too hard about adding fragments,
it would be worth seeing if the buffer cache needs any tuning to take
better advantage of clustering.

michaelkjohnson