Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2003 11:16:50 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@freebsd.org
Subject:   Re: umass(4)/uhci(4) REALLY slow
Message-ID:  <20031001111502.F85421@root.org>
In-Reply-To: <20031001142825.K4031@gamplex.bde.org>
References:  <20030930172903.S82394@root.org> <20031001142825.K4031@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Oct 2003, Bruce Evans wrote:
> On Tue, 30 Sep 2003, Nate Lawson wrote:
> > Here are "iostat 5" results for my USB thumb drive on a uhci(4) controller
> > with 5.1-CURRENT.  On windows on the same box, it runs reasonably quickly.
> > On FreeBSD, it really lags.  This is for a cp of a large file to a
> > msdosfs-mounted flash drive.
> >
> >      da0
> >   KB/t tps  MB/s
> >   1.07  41  0.04
> >   1.00  41  0.04
> >   1.02  41  0.04
> >
> > Is there something we're doing on uhci(4) that makes each transfer only
> > 1 KB?  If we upped it to 32 KB, it would be a more reasonable 1.2 MB/sec
> > which is still well under the USB 1.1 max speed.
>
> This is probably due to something we're not doing in msdosfs.  1K is
> probably your msdosfs file system block size.

Yes, I checked and it has a 1K block size.  The flash device is 64 MB.

> msdosfs is missing support
> for clustering.  None of the lower levels (buffer cache, driver, usb)
> in FreeBSD does clustering (the buffer cache has some support for it,
> but this is mostly turned off because the file system doesn't ask for
> it).  The lower levels not in FreeBSD (firmware and hardware) apparently
> don't do clustering either.  This results in abysmal performance if
> the msdosfs block size is small.  It would be twice as abysmal with
> the minimum block size of 512.  Similarly for ffs with small block sizes
> and lots of fragments if write clustering is turned off if the drive
> doesn't do it.

What would need to be done to add msdosfs clustered reads/writes or
perhaps do this in a more general way in the buffer cache?

-Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031001111502.F85421>