From owner-freebsd-stable@freebsd.org Mon Jan 2 11:14:07 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 977DCC9B8BD for ; Mon, 2 Jan 2017 11:14:07 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B41105D for ; Mon, 2 Jan 2017 11:14:06 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id v02BE11O056277; Mon, 2 Jan 2017 22:14:02 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 2 Jan 2017 22:14:01 +1100 (EST) From: Ian Smith To: "Marat N.Afanasyev" cc: FreeBSD stable Subject: Re: usb 3.0 thumb drive speed limit In-Reply-To: <586A2495.5030301@li.ru> Message-ID: <20170102212552.O26979@sola.nimnet.asn.au> References: <586A0F05.6050504@li.ru> <20170102202711.G26979@sola.nimnet.asn.au> <586A2495.5030301@li.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 11:14:07 -0000 On Mon, 2 Jan 2017 12:59:49 +0300, Marat N.Afanasyev wrote: > Ian Smith wrote: > > On Mon, 2 Jan 2017 11:27:49 +0300, Marat N.Afanasyev wrote: > > > I wonder is there a speed limit on usb 3.0? I've bought > > > > > > ugen0.4: at usbus0 > > > umass2 on uhub7 > > > umass2: on usbus0 > > > da2 at umass-sim2 bus 2 scbus9 target 0 lun 0 > > > da2: Removable Direct Access SPC-4 SCSI device > > > da2: Serial Number AA010808161609220143 > > > da2: 40.000MB/s transfers > > > da2: 59840MB (122552320 512 byte sectors) > > > da2: quirks=0x2 > > > > > > that claims 'Up to 245 MBytes/sec read speed' > > > > > > and dd shows: > > > > > > % dd if=/dev/da2 of=/dev/null bs=1m count=1000 > > > 1000+0 records in > > > 1000+0 records out > > > 1048576000 bytes transferred in 25.688997 secs (40818098 bytes/sec) > > > > > > why we have such a limit? > > > > 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 > 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) > > 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. 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 :) > And I do have usb 3.0: > > % grep xhci /var/run/dmesg.boot > xhci0: mem 0xfeaf8000-0xfeafffff irq 17 > at device 0.0 on pci5 > xhci0: 64 bytes context size, 64-bit DMA > usbus0 on xhci0 > xhci0: mem 0xfeaf8000-0xfeafffff irq 17 > at device 0.0 on pci5 > xhci0: 64 bytes context size, 64-bit DMA > usbus0 on xhci0 > > and I tried this thumb drive is in usb 3.0 port first, of course. Sorry for the static, I know nothing .. and running now unsupported 9.3 cheers, Ian