Date: Sun, 17 Jan 1999 21:14:25 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: "John S. Dyson" <root@dyson.iquest.net>, dg@root.com, jkh@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Found problem w/ Paging performance over NFS Message-ID: <199901180514.VAA57485@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
This is pretty cool - I figured out why the paging performance is so horrible over NFS but good to local disk. It turns out that the NFS subsystem looks at B_ASYNC in the bp. This flag is not set by the paging code, so the NFS writes requested by the pageout daemon were being done synchronously. Setting B_ASYNC makes the paging go a whole lot faster, but creates other problems relating to pbgetvp() and pbrelvp() calls - these calls associate a vnode with a bp without linking the bp into the vnode or messing with the vnode's reference count. The problem is that NFS ( and possibly other subsystems), assumes that it can call reassignbuf() on any bp when, in fact, it can't. bp's handed to them from the paging system ( or any other subsystem that uses pbgetvp() ) cannot be reassigned using reassignbuf(). nfs_doio() hits this sometimes when you ^C a program. In anycase, I fixed things up to formally separate bp's that use pbgetvp() and bp's that do not, put in some asserts to enforce it, and fixed the code in nfs_doio() that was messing things up. The B_PAGING flag is now associated specifically with 'bp's that quickly assign b_vp without messing with links or reference counts'. I've also upgraded my LAN to 100BaseTX to test it. With 4 nfsiod's running, I am getting excellent paging performance to NFS swap - 1.5 to 2.5 megabytes a second on pageout instead of 250 KBytes/sec. The diskless workstation now pages out as well as a normal server! -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901180514.VAA57485>