From owner-freebsd-stable@freebsd.org Mon Jan 2 22:13:32 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 4C09BC9CB10 for ; Mon, 2 Jan 2017 22:13:32 +0000 (UTC) (envelope-from florian.ermisch@alumni.tu-berlin.de) Received: from mail-2.alumni.tu-berlin.de (mail-2.alumni.tu-berlin.de [130.149.5.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122A71C08 for ; Mon, 2 Jan 2017 22:13:31 +0000 (UTC) (envelope-from florian.ermisch@alumni.tu-berlin.de) X-tubIT-Incoming-IP: 78.52.175.37 Received: from x4e34af25.dyn.telefonica.de ([78.52.175.37] helo=floh-lg-g4.fritz.box) by mailbox.alumni.tu-berlin.de (exim-4.84_2) with esmtpsa [TLSv1.2:DHE-RSA-AES256-SHA:256] id 1cOAh1-0002ds-PY; Mon, 02 Jan 2017 23:03:00 +0100 In-Reply-To: <586A2495.5030301@li.ru> References: <586A0F05.6050504@li.ru> <20170102202711.G26979@sola.nimnet.asn.au> <586A2495.5030301@li.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: usb 3.0 thumb drive speed limit From: Florian Ermisch Date: Mon, 02 Jan 2017 23:02:56 +0100 To: "Marat N.Afanasyev" CC: FreeBSD stable Message-ID: <2E28B7BD-84DF-45EB-AB30-994DE26A0025@alumni.tu-berlin.de> 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 22:13:32 -0000 Am 2. Januar 2017 10:59:49 MEZ, schrieb "Marat N.Afanasyev" : > 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' > > > > cheers, Ian > > > > > 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 > > 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. Are you running 10.x or 11.0? When was running 10.1 I only got ~27 MB/s out of each of my two external HDDs connected to the same USB3 port (two disk enclosure, speed according to `zpool iostat -v` AFAIR). They also attached as high-speed devices. Some time after upgrading to the than current 11-CURRENT I've noticed kernel messages mentioning 400 MB/s instead of 40 MB/s and quite an improvement in throughput. May be a quirk in the driver for your paricular XHCI chip. Regards, Florian