From owner-freebsd-lite2 Wed Oct 9 07:19:27 1996 Return-Path: owner-lite2 Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA26869 for lite2-outgoing; Wed, 9 Oct 1996 07:19:27 -0700 (PDT) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA26864 for ; Wed, 9 Oct 1996 07:19:03 -0700 (PDT) Received: from uno.sat.t.u-tokyo.ac.jp by mail.crl.com with SMTP id AA17108 (5.65c/IDA-1.5 for ); Wed, 9 Oct 1996 07:19:18 -0700 Received: by uno.sat.t.u-tokyo.ac.jp (8.7.3+2.6Wbeta5/8.7.3) with ESMTP id XAA02391; Wed, 9 Oct 1996 23:16:24 +0900 (JST) To: dfr@render.com Cc: henrich@crh.cl.msu.edu, lite2@freebsd.org Subject: Re: Delayed write patch In-Reply-To: Your message of "Wed, 9 Oct 1996 14:11:15 +0100 (BST)" References: X-Mailer: Mew version 1.06 on Emacs 19.28.1, Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Wed, 09 Oct 1996 23:16:23 +0900 Message-Id: <2389.844870583@sat.t.u-tokyo.ac.jp> From: Hidetoshi Shimokawa Sender: owner-lite2@freebsd.org X-Loop: FreeBSD.org Precedence: bulk dfr> > I tried this patch, but there is no performance improvement. dfr> > It's still around 300KB. dfr> > dfr> > tcpdump shows that only one iod is running. dfr> dfr> If you change nfs_asyncio to return EIO instead of using a delayed write, dfr> how many iods are running? if I start 4 iods, 4 iods are running. observing by tcpdump, 1) without delayed write (800KB/s) client server ------------------------ req(async) req(async) req(async) req(async) req(sync) rep rep rep rep rep req req req req req rep rep rep rep rep req ... 2) with delayed write (300KB/s) client server ------------------------ req req req req rep rep req req rep .... req rep req rep req rep .... The following is the patch to control delayed write by sysctl. (sorry, I don't know wether this is the right usage of sysctl) *** nfs_bio.c.orig Mon Sep 30 22:39:29 1996 --- nfs_bio.c Wed Oct 9 23:13:25 1996 *************** *** 46,51 **** --- 46,52 ---- #include #include #include + #include #include #include *************** *** 65,70 **** --- 66,74 ---- extern int nfs_numasync; extern struct nfsstats nfsstats; + int nfs_dwrite; + SYSCTL_INT(_vfs_nfs, OID_AUTO, dwrite, CTLFLAG_RW, &nfs_dwrite, 0, ""); + /* * Ifdefs for FreeBSD-current's merged VM/buffer cache. It is unfortunate * that this isn't done inside getblk() and brelse() so these calls *************** *** 758,763 **** --- 762,768 ---- * is currently doing a write for this file and will pick up the * delayed writes before going back to sleep. */ + if (!nfs_dwrite) return (EIO); bp->b_flags |= B_DELWRI; reassignbuf(bp, bp->b_vp); biodone(bp); /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp