From owner-freebsd-fs Wed Oct 17 16: 3:30 2001 Delivered-To: freebsd-fs@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id B9CFD37B409; Wed, 17 Oct 2001 16:03:26 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id f9HN3Hq37572; Wed, 17 Oct 2001 16:03:17 -0700 (PDT) (envelope-from dillon) Date: Wed, 17 Oct 2001 16:03:17 -0700 (PDT) From: Matthew Dillon Message-Id: <200110172303.f9HN3Hq37572@apollo.backplane.com> To: Dag-Erling Smorgrav , Paul Saab Cc: John Baldwin , Bruce Evans , fs@FreeBSD.ORG Subject: Re: Some questions regarding vfs / ffs References: <200110170229.f9H2Tph84237@apollo.backplane.com> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I'm slowly tracking down the issues with sync. There are three or four. The main problem appears to be simply due to the overhead of the locking, plus the overhead is a number of recent additions. For example, VOP_GETVOBJECT(). The core vnode scanning loop is extremely cycle-sensitive when you have hundreds of thousands of vnodes. Even just adding a subroutine call can tripple the overhead. I'm integrating a number of performance fixes for sync into my kern.maxvnodes patchset. The two are tied together, unfortunately, due to having to change the vnode list from a LIST to a TAILQ. I have made two performance fixes for sync so far, they are available in the kern.maxvnodes patch #3 (for -stable only at the moment), at: http://apollo.backplane.com/FreeBSD4/ http://apollo.backplane.com/FreeBSD4/maxvnodes-03.diff These performance fixes are to vfs_msync() and ffs_sync(). I have not made any performance fixes to qsync() yet (which only applies if quotas are turned on). If hundreds of thousands of vnodes are present 'sync' eats about 1/5 the cpu it ate before. The glitch is still there, but not as pronounced. The only way to really get rid of the glitch will be to separate the vnode list in the mount structure into two. A 'clean' and a 'dirty' list. This patch set is pretty messy already so I'm going wait on that. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message