From owner-freebsd-bugs@FreeBSD.ORG Sun Jan 9 20:10:24 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8771F16A4CE for ; Sun, 9 Jan 2005 20:10:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AB8F43D4C for ; Sun, 9 Jan 2005 20:10:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j09KAO6r025606 for ; Sun, 9 Jan 2005 20:10:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j09KAOH7025605; Sun, 9 Jan 2005 20:10:24 GMT (envelope-from gnats) Date: Sun, 9 Jan 2005 20:10:24 GMT Message-Id: <200501092010.j09KAOH7025605@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Subject: Re: kern/45558: [msdosfs] mdconfig and msdosfs make fs writes hang X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 20:10:24 -0000 The following reply was made to PR kern/45558; it has been noted by GNATS. From: Bruce Evans To: Kris Kennaway Cc: Jacques Garrigue , freebsd-gnats-submit@freebsd.org Subject: Re: kern/45558: [msdosfs] mdconfig and msdosfs make fs writes hang Date: Mon, 10 Jan 2005 07:04:07 +1100 (EST) On Wed, 5 Jan 2005, Kris Kennaway wrote: > On Thu, Jan 06, 2005 at 02:50:31AM +0000, Jacques Garrigue wrote: > > Good news: > > > > It looks like mdconfig now works correctly on msdos partitions. > > I built a 1G file on a 32-bit fat partition, and mounted it as ffs > > with mdconfig, and it has been working nicely for a while, with a lot > > of activity. > > > > I'm however a bit surprised by the slow writes, considering I'm using > > soft updates on the partition. Something in the intereaction with > > msdosfs? > > msdosfs is not known as a high-performance filesystem ;-) That's mainly because msdosfs is poorly implemented in FreeBSD. Its main poornesses are random block allocation (for the first block in a file) and non-use of VMIO. After fixing these and some non-asyncness, it is only about 20% slower than ffs1 for copying a cached copy of /usr/src (60 seconds instead of 50), and for the more interesting result of reading back the copy to see if the files were layed out without much fragmentation, it is only 10% slower than ffs1 (19 seconds instead of 17.2). In -current the read-back takes over 400 seconds. The slow read-back is entirely due to the poor layout from random block allocation. The only performance problem with msdosdfs should be that it fragments too easily. Fragmentation can be very bad in ffs too. It just takes longer and its perfermance reduction is limited to more like a factor of 10 than a factor of 100. In the above, 17.2 seconds for reading 400MB of files is very good -- almost half the disk bandwidth of about 40MB/sec. tar cf of my active, fragmented copy of /usr/src on a slower (25-30MB/sec) disk today takes 94 seconds. Bruce