From owner-cvs-all Sat Oct 19 14:38:57 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F76237B41A for ; Sat, 19 Oct 2002 14:38:54 -0700 (PDT) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1D6243E7B for ; Sat, 19 Oct 2002 14:38:48 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14036 invoked from network); 19 Oct 2002 21:38:46 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 19 Oct 2002 21:38:46 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id g9JLcin5053205; Sat, 19 Oct 2002 17:38:44 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200210182252.g9IMqf3T094566@repoman.freebsd.org> Date: Sat, 19 Oct 2002 17:38:47 -0400 (EDT) From: John Baldwin To: Matt Dillon Subject: RE: cvs commit: src/sys/ufs/ffs ffs_balloc.c ffs_vnops.c src/sys Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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