Re: File system blocks alignment

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Wed, 06 Jan 2010 12:36:32 +0100
"Svein Skogen" <svein-listmail_at_stillbilde.net> writes:
> Dag-Erling Smørgrav <des_at_des.no> writes:
> > Or just default to 4 kB or even 8 kB, which has zero performance impact
> > (either way) for disks with 512 B sectors.
> I'd like it to be tunable.

It already *is* tunable, and always has been - it's just a matter of
selecting the correct offsets and sizes when you partition the disk /
array, and using the correct newfs parameters.

The problem is the default alignment used by fdisk, gpart etc.  Fdisk
aligns slices on cylinder boundaries, even though cylinders are just a
figment of the drive firmware's imagination.  Sysinstall is even worse,
since (IIRC) it *forces* cylinder alignment unless you select expert
mode and type in the correct numbers.  Marcel described the situation
for gpart somewhere else in this thread.

As for newfs, the defaults are fine as long as the filesystem doesn't
fill up to the point where UFS starts using fragments - but when it
does, you're in trouble anyway, so there's no point in overriding the
defaults unless it makes sense for your data: a filesystem used mostly
to store large files may benefit from increased block / fragment sizes,
but remember to keep the 8:1 ratio.

DES
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Wed Jan 06 2010 - 10:36:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC