Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 16:01:40 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Ollivier Robert <roberto@ns2.freenix.org>, Peter Wemm <peter@wemm.org>, "David O'Brien" <obrien@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <freebsd-arch@FreeBSD.org>
Subject:   Re: cvs commit: src/sbin/newfs newfs.8 newfs.c
Message-ID:  <20011016154235.N6619-100000@delplex.bde.org>
In-Reply-To: <200110151607.f9FG7QL54919@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Oct 2001, Matt Dillon wrote:

>     note: we shouldn't default to anything other then 8K/1K or 16K/2K.  No
>     other combinations are optimal at the moment.

This depends on the mix of file sizes, and probably on the drive.  My
benchmarks (made just after the dirpref changes) showed that 4K/2K,
8K/2K and 16K/2K are optimal for holding /usr/src, as measured by
tarring up the src tree on a freshly mounted filesystem after just
having written the src tree to an empty filesystem (the write speed
is relatively sensitive to the layout).  This is presumably caused by
the average fragment size being related to 2K.

ffs-4096-512:
tar cf /dev/null src:         51.50 real         1.09 user        12.61 sys
ffs-4096-1024:
tar cf /dev/null src:         39.77 real         1.17 user        12.16 sys
ffs-4096-2048:
tar cf /dev/null src:         37.29 real         1.26 user        12.51 sys
ffs-4096-4096:
tar cf /dev/null src:         38.92 real         1.00 user        12.51 sys
ffs-8192-1024:
tar cf /dev/null src:         39.39 real         1.07 user        11.27 sys
ffs-8192-2048:
tar cf /dev/null src:         32.90 real         0.89 user        11.50 sys
ffs-8192-4096:
tar cf /dev/null src:         33.53 real         1.02 user        11.33 sys
ffs-8192-8192:
tar cf /dev/null src:         37.85 real         1.10 user        11.54 sys
ffs-16384-2048:
tar cf /dev/null src:         28.47 real         1.09 user        10.76 sys
ffs-16384-4096:
tar cf /dev/null src:         29.64 real         1.12 user        10.86 sys
ffs-16384-8192:
tar cf /dev/null src:         32.67 real         0.98 user        10.83 sys
ffs-16384-16384:
tar cf /dev/null src:         44.43 real         1.07 user        11.24 sys

Note that the extremes of 4K:512 and 16K:16K are the worst, despite 4K:512
having the 8:1 ratio.

The filesystem for this test was rather small (about 1GB) IIRC.  Larger
block sizes work relatively better for larger filesystems, not because
they can be accessed more efficiently (clustering makes this advantage
small), but because they reduce the number of cylinder groups by a small
factor.  The dirpref changes reduced this advantage significantly.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016154235.N6619-100000>