[issue1231] The problem with USB stick and msdosfs

Jeremy Chadwick jdc at parodius.com
Mon Jan 19 05:44:18 PST 2009


On Mon, Jan 19, 2009 at 02:33:38PM +0100, Simon 'corecode' Schubert wrote:
> Jeremy Chadwick wrote:
> > On Fri, Jan 16, 2009 at 08:56:49PM +0000, Hasso Tepper (via DragonFly issue tracker) wrote:
> >> da0: <pqi IntelligentStick 0.00> Removable Direct Access SCSI-2 device
> >> da0: 40.000MB/s transfers
> >> da0: 963MB (1974271 512 byte sectors: 64H 32S/T 963C)
> >>
> >> $ sudo dd if=/dev/zero of=/mnt/file bs=512k count=100
> >> 100+0 records in
> >> 100+0 records out
> >> 52428800 bytes transferred in 1.744845 secs (30047824 bytes/sec)
> >> $ time sudo umount /mnt
> >> real    4m7.152s 	<- ?!?!?! 
> >> user    0m0.008s
> >> sys     0m0.047s
> >> $
> >>
> >> It doesn't happen with any other OS (tried Debian, MacOSX and Windows XP) 
> >> and there is no problem in DragonFly with the very same formatted to UFS 
> >> either.
> > 
> > Does the behaviour change if you use standard 512-byte blocks?  People
> > seem to think that USB pen/flash drives behave exactly like hard disks
> > when it comes to their methodology of storage and block handling -- they
> > don't.
> 
> Yes.  Smaller writes are much worse than larger writes.

The below may or may not be relevant to Hasso's situation, but I'm
chiming in regardless.

I did some testing of this nature on FreeBSD, using their new USB stack
in -CURRENT, specifically on USB flash drives.  The old USB stack
performed horribly (and I've a feeling what's in DFBSD).

Here are the numbers:

http://lists.freebsd.org/pipermail/freebsd-current/2008-November/000271.html

Be sure to read the Points of Interest.  Larger block sizes (above
128KB) performed equal to, or sometimes worse (!), than 128KB.  Also
note the performance increase with 64KB blocks.

My point here is that yes, there's going to be a difference between
512-byte and 512-kilobyte blocks, but when it comes to USB flash drives,
there is in fact a "sweet spot".

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |






More information about the Bugs mailing list