Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jan 2017 12:09:11 -0500
From:      Lowell Gilbert <freebsd-stable-local@be-well.ilk.org>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        "Marat N.Afanasyev" <amarat@li.ru>, FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Re: usb 3.0 thumb drive speed limit
Message-ID:  <44shp1l77s.fsf@lowell-desk.lan>
In-Reply-To: <20170102212552.O26979@sola.nimnet.asn.au> (Ian Smith's message of "Mon, 2 Jan 2017 22:14:01 %2B1100 (EST)")
References:  <586A0F05.6050504@li.ru> <20170102202711.G26979@sola.nimnet.asn.au> <586A2495.5030301@li.ru> <20170102212552.O26979@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Smith <smithi@nimnet.asn.au> writes:

> On Mon, 2 Jan 2017 12:59:49 +0300, Marat N.Afanasyev wrote:
>  > Ian Smith wrote:
>  > > 
>  > > Seems you've plugged it into a USB 2 port, not USB 3
>  > > 
>  > > At least you're getting full USB 2 performance (40MB/s)
>  > > 
>  > > Check if you have one or more USB 3 ports with 'dmesg | grep xhci'
>
>  > afair, single usb 2.0 device can be as fast as 240 Mbits/sec, not 320

280 Mbits/sec, actually.

>  > Mbits/sec:
>  > 
>  > % dd if=/dev/da2 of=/dev/null bs=1m count=1000
>  > 1000+0 records in
>  > 1000+0 records out
>  > 1048576000 bytes transferred in 34.026227 secs (30816699 bytes/sec)

30816699 bytes/sec is a little over 30 Megabytes per second. Which is
about right. Was someone misplacing a decimal? Or confusing bits with
bytes?

[Making things more confusing is that generally people refer to
megabytes as 10e6 for disks and 2e20 for memory. For flash, it's the
latter, but if you access it through a "disk" interface (like a thumb
drive), you'll generally get 10e6 type numbers.

>  > 
>  > it's the same drive in usb 2.0 port
>
> Ah, guess I've been taking "40.000MB/s transfers" for USB2 at its word.

The 40MB/s number includes overhead, so you'll never get quite that high.

> Testing 3 USB2 sticks in a USB2 port on my X200 (2.4GHz Core2Duo) I only 
> get about 18-20MB/s read for bs=1M count=1k, with little load although 
> 3k IRQ/s and 10k context switches/s, so I thought yours was good :)

These things will vary with your hardware; both the driver chips in the
computer and the flash stick itself. And some other things too, but I
can't recall exactly.



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