Date: Sat, 19 Oct 2002 17:38:47 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Matt Dillon <dillon@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: RE: cvs commit: src/sys/ufs/ffs ffs_balloc.c ffs_vnops.c src/sys Message-ID: <XFMail.20021019173847.jhb@FreeBSD.org> In-Reply-To: <200210182252.g9IMqf3T094566@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18-Oct-2002 Matt Dillon wrote: > dillon 2002/10/18 15:52:41 PDTs > > Modified files: > sys/ufs/ffs ffs_balloc.c ffs_vnops.c > sys/ufs/ufs ufs_extern.h > Log: > Fix a file-rewrite performance case for UFS[2]. When rewriting portions > of a file in chunks that are less then the filesystem block size, if the > data is not already cached the system will perform a read-before-write. > The problem is that it does this on a block-by-block basis, breaking up the > I/Os and making clustering impossible for the writes. Programs such > as INN using cyclic file buffers suffer greatly. This problem is only going > to get worse as we use larger and larger filesystem block sizes. > > The solution is to extend the sequential heuristic so UFS[2] can perform > a far larger read and readahead when dealing with this case. > > (note: maximum disk write bandwidth is 27MB/sec thru filesystem) > (note: filesystem blocksize in test is 8K (1K frag)) > dd if=/dev/zero of=test.dat bs=1k count=2m conv=notrunc > > Before: (note half of these are reads) > tty da0 da1 acd0 cpu > tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id > 0 76 14.21 598 8.30 0.00 0 0.00 0.00 0 0.00 0 0 7 1 92 > 0 76 14.09 813 11.19 0.00 0 0.00 0.00 0 0.00 0 0 9 5 86 > 0 76 14.28 821 11.45 0.00 0 0.00 0.00 0 0.00 0 0 8 1 91 > > After: (note half of these are reads) > tty da0 da1 acd0 cpu > tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id > 0 76 63.62 434 26.99 0.00 0 0.00 0.00 0 0.00 0 0 18 1 80 > 0 76 63.58 424 26.30 0.00 0 0.00 0.00 0 0.00 0 0 17 2 82 > 0 76 63.82 438 27.32 0.00 0 0.00 0.00 0 0.00 1 0 19 2 79 > > Reviewed by: mckusick > Approved by: re > X-MFC after: immediately (was heavily tested in -stable for 4 months) Please wait to MFC for at least a couple of days. Thanks. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021019173847.jhb>