Date: Wed, 09 Oct 1996 23:16:23 +0900 From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> To: dfr@render.com Cc: henrich@crh.cl.msu.edu, lite2@freebsd.org Subject: Re: Delayed write patch Message-ID: <2389.844870583@sat.t.u-tokyo.ac.jp> In-Reply-To: Your message of "Wed, 9 Oct 1996 14:11:15 %2B0100 (BST)" References: <Pine.BSF.3.95.961009141039.10204f-100000@minnow.render.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/vnode.h> #include <sys/mount.h> #include <sys/kernel.h> + #include <sys/sysctl.h> #include <vm/vm.h> #include <vm/vm_param.h> *************** *** 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2389.844870583>