File system blocks alignment

Peter Jeremy peterjeremy at acm.org
Sat Jan 2 21:01:22 UTC 2010


Thanks for that testing - the results are quite enlightening.  Given
that the PC architecture forces unaligned partition boundaries by
default, these drives are likely to wind up with a bad reputation for
performance.

On 2010-Jan-01 21:53:43 +0100, Pieter de Goeje <pieter at degoeje.nl> wrote:
>- Partition size was 10GB, dump archive ~550MB (dump of /). The archive easily
>fitted in main memory (8GB).
...
>It was somewhat surprising to see restore being faster than tar in the aligned
>case though. Mounting async or using soft updates resulted in a 6sec restore, 
>while tar took about 8sec.

With async or softupdates, there is likely to be virtually no physical
write activity during the restore, with all the data winding up in the
buffer cache to be flushed during the unmount.

IMO, the 'restore' timing should include the unmount, changing:
>	cd /mnt
>	echo "restore" >> $results
>	time -ao $results restore -rf $fsarchive || exit 1
>	cd /
>	umount /mnt
>	echo "fsck_ffs" >> $results

to:
>	echo "restore" >> $results
>	time -ao $results sh -c 'cd /mnt && restore -rf $fsarchive && cd / && unmount /mnt' || exit 1
>	echo "fsck_ffs" >> $results

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100102/e061c43e/attachment.pgp


More information about the freebsd-current mailing list