From owner-freebsd-usb@FreeBSD.ORG Wed Oct 19 18:28:39 2011 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B05F21065672; Wed, 19 Oct 2011 18:28:39 +0000 (UTC) Date: Wed, 19 Oct 2011 18:28:39 +0000 From: Alexander Best To: Hans Petter Selasky Message-ID: <20111019182839.GA95519@freebsd.org> References: <201110190600.p9J60dMi057926@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110190600.p9J60dMi057926@freefall.freebsd.org> Cc: freebsd-usb@FreeBSD.org Subject: Re: usb/161793: poor EHCI usb2 i/o performance X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 18:28:39 -0000 On Wed Oct 19 11, Hans Petter Selasky wrote: > The following reply was made to PR usb/161793; it has been noted by GNATS. > > From: Hans Petter Selasky > To: freebsd-usb@freebsd.org > Cc: Chargen , > freebsd-gnats-submit@freebsd.org > Subject: Re: usb/161793: poor EHCI usb2 i/o performance > Date: Wed, 19 Oct 2011 07:55:50 +0200 > > Hello, > > When testing and formatting, it is important to set the block size to 65536 > bytes to get the maximum performance. The default blocksize of "dd" is 512 > bytes, and there is no read-ahead! Try again using: > > dd if=/dev/daX of=/dev/null bs=65536. results here are: otaku% dd if=/dev/da0 of=/dev/null bs=65536 30495+1 records in 30495+1 records out 1998585344 bytes transferred in 159.388494 secs (12539082 bytes/sec) otaku% dd if=/dev/da0 of=/dev/null bs=65536 238033+1 records in 238033+1 records out 15599771136 bytes transferred in 655.616437 secs (23794051 bytes/sec) testing an old usb stick and a fairly recent one. that's with usb2 and running HEAD. the results are incredible imo. my usb controller is cheers. alex > > Thank you, > > --HPS > > On Wednesday 19 October 2011 05:41:16 Chargen wrote: > > >Number: 161793 > > >Category: usb > > >Synopsis: poor EHCI usb2 i/o performance > > >Confidential: no > > >Severity: non-critical > > >Priority: low > > >Responsible: freebsd-usb > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: sw-bug > > >Submitter-Id: current-users > > >Arrival-Date: Wed Oct 19 03:50:03 UTC 2011 > > >Closed-Date: > > >Last-Modified: > > >Originator: Chargen > > >Release: 10.0-CURRENT > > >Organization: > > > > >Environment: > > FreeBSD schwarzesonne 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Tue Oct 18 > > 21:40:49 CEST 2011 > > chargen@schwarzesonne:/usr/src/sys/i386/compile/SCHWARZESONNE i386 > > > > >Description: > > I did some OHCI/EHCI usb1/2 subsystem performance checks on CURRENT with 1 > > older generation 1gb USB memory stick and a newer 2GB USB memory stick. > > EHCI, usb2 UFS or MSDOSFS formatted gives about the same performance in > > FreeBSD, ~3MB/s and about 8~10 MB/s under Windows operating systems using > > the same hardware. > > > > schwarzesonne# usbconfig dump_info | grep "480" > > ugen2.1: at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) > > pwr=SAVE schwarzesonne# dmesg | grep "usbus2" > > usbus2: EHCI version 1.0 > > usbus2: on ehci0 > > usbus2: 480Mbps High Speed USB v2.0 > > ugen2.1: at usbus2 > > uhub2: on usbus2 > > ugen2.2: at usbus2 > > umass0: on usbus2 > > schwarzesonne# mount > > /dev/da0p2 on / (ufs, local, noatime, journaled soft-updates) > > devfs on /dev (devfs, local) > > schwarzesonne# dmesg | grep "da1" > > da1 at umass-sim0 bus 0 scbus4 target 0 lun 0 > > da1: Removable Direct Access SCSI-2 device > > da1: 40.000MB/s transfers > > da1: 999MB (2047998 512 byte sectors: 64H 32S/T 999C) > > schwarzesonne# time dd if=/dev/zero of=/dev/da1 count=2 > > 2+0 records in > > 2+0 records out > > 1024 bytes transferred in 0.003543 secs (289029 bytes/sec) > > 0.000u 0.002s 0:00.02 0.0% 0+0k 0+2io 0pf+0w > > schwarzesonne# ls -alrt /dev/da1* > > crw-r----- 1 root operator 0x55 Oct 19 03:01 /dev/da1 > > crw-r----- 1 root operator 0x62 Oct 19 03:01 /dev/da1s1 > > crw-r----- 1 root operator 0x72 Oct 19 03:02 /dev/da1s1a > > schwarzesonne# fdisk -vBI /dev/da1 > > ******* Working on device /dev/da1 ******* > > fdisk: invalid fdisk partition table found > > parameters extracted from in-core disklabel are: > > cylinders=999 heads=64 sectors/track=32 (2048 blks/cyl) > > > > parameters to be used for BIOS calculations are: > > cylinders=999 heads=64 sectors/track=32 (2048 blks/cyl) > > > > Information from DOS bootblock is: > > 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > > start 32, size 2045920 (998 Meg), flag 80 (active) > > beg: cyl 0/ head 1/ sector 1; > > end: cyl 998/ head 63/ sector 32 > > 2: > > 3: > > 4: > > fdisk: Class not found > > schwarzesonne# bsdlabel -w da1s1 > > schwarzesonne# time newfs -O 1 /dev/da1s1a > > /dev/da1s1a: 999.0MB (2045904 sectors) block size 32768, fragment size 4096 > > using 4 cylinder groups of 249.75MB, 7992 blks, 16128 inodes. > > super-block backups (for fsck -b #) at: > > 64, 511552, 1023040, 1534528 > > 0.005u 0.015s 0:06.25 0.1% 128+15616k 6+260io 0pf+0w > > schwarzesonne# mkdir /mnt/usb > > schwarzesonne# mount -v /dev/da1s1a /mnt/usb/ > > /dev/da1s1a on /mnt (ufs, local, fsid 66279e4eff2fa382) > > > > schwarzesonne# time dd if=/dev/zero bs=1m count=500 > /mnt/usb/500mb > > 500+0 records in > > 500+0 records out > > 524288000 bytes transferred in 106.844333 secs (4907027 bytes/sec) > > 0.007u 1.813s 1:46.85 1.6% 28+5603k 5+4006io 0pf+0w > > > > : rebooted to flush caches and track read performance > > > > schwarzesonne# reboot > > schwarzesonne# mount /dev/da1s1a /mnt/usb > > schwarzesonne# time cp /mnt/usb/500mb /root/. > > 0.000u 2.665s 0:44.18 6.0% 21+5364k 4007+4000io 0pf+0w > > > > :: EHCI, 2gb stick, usb2 performance, same procedure, rebooted and used > > :: newfs > > > > Oct 19 04:15:53 schwarzesonne kernel: da1 at umass-sim0 bus 0 scbus4 target > > 0 lun 0 Oct 19 04:15:53 schwarzesonne kernel: da1: > > Removable Direct Access SCSI-2 device Oct 19 04:15:53 schwarzesonne > > kernel: da1: 40.000MB/s transfers > > Oct 19 04:15:53 schwarzesonne kernel: da1: 2024MB (4145664 512 byte > > sectors: 255H 63S/T 258C) ugen2.2: at usbus2, cfg=0 > > md=HOST spd=HIGH (480Mbps) pwr=ON > > > > schwarzesonne# time newfs -O 1 /dev/da1s1a > > /dev/da1s1a: 2023.8MB (4144688 sectors) block size 32768, fragment size > > 4096 using 4 cylinder groups of 505.97MB, 16191 blks, 32512 inodes. > > super-block backups (for fsck -b #) at: > > 64, 1036288, 2072512, 3108736 > > 0.027u 0.009s 0:08.75 0.2% 64+7808k 6+516io 0pf+0w > > schwarzesonne# time dd if=/dev/zero bs=1m count=500 > /mnt/usb/500mb > > 500+0 records in > > 500+0 records out > > 524288000 bytes transferred in 173.849854 secs (3015752 bytes/sec) > > 0.008u 1.812s 2:53.85 1.0% 23+4694k 4+4005io 0pf+0w > > > > :: EHCI, 2gb stick, usb2 performance, msdosfs FAT formatted under WindowsXP > > > > schwarzesonne# mount -t msdosfs -o -m=644,-M=755 /dev/da1s1 /mnt/usb > > schwarzesonne# time dd if=/dev/zero bs=1m count=500 > /mnt/usb/500mb > > 500+0 records in > > 500+0 records out > > 524288000 bytes transferred in 170.956245 secs (3066796 bytes/sec) > > 0.008u 1.787s 2:50.95 1.0% 24+4862k 0+8001io 0pf+0w > > > > :: OHCI, 2gb stick, performance > > > > schwarzesonne# time dd if=/dev/zero bs=1m count=500 > /mnt/usb/500mb > > 500+0 records in > > 500+0 records out > > 524288000 bytes transferred in 601.650968 secs (871416 bytes/sec) > > 0.000u 1.723s 10:01.65 0.2% 22+4325k 4+4005io 0pf+0w > > > > >How-To-Repeat: > > > > > >Fix: > > > > > > > > >Release-Note: > > >Audit-Trail: > > > > >Unformatted: > > _______________________________________________ > > freebsd-usb@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org"