From owner-freebsd-stable@FreeBSD.ORG Mon Mar 5 19:18:22 2007 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA69716A404 for ; Mon, 5 Mar 2007 19:18:22 +0000 (UTC) (envelope-from SRS0=f8feaae2996a03cecfdd4ed334fdebf46624e9b7=265=es.net=oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF0013C494 for ; Mon, 5 Mar 2007 19:18:22 +0000 (UTC) (envelope-from SRS0=f8feaae2996a03cecfdd4ed334fdebf46624e9b7=265=es.net=oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id KWK27555; Mon, 05 Mar 2007 11:05:55 -0800 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 22F354508C; Mon, 5 Mar 2007 11:05:55 -0800 (PST) To: freebsd-stable@FreeBSD.ORG, Alexander Shikoff , wangyi6854@sohu.com In-Reply-To: Your message of "Thu, 22 Feb 2007 10:45:03 +0100." <200702220945.l1M9j3Tj031803@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1173121555_18113P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 05 Mar 2007 11:05:55 -0800 From: "Kevin Oberman" Message-Id: <20070305190555.22F354508C@ptavv.es.net> Cc: Subject: Re: Very slow umass in 6.2-RC2 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Mar 2007 19:18:22 -0000 --==_Exmh_1173121555_18113P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Thu, 22 Feb 2007 10:45:03 +0100 (CET) > From: Oliver Fromme > Sender: owner-freebsd-stable@freebsd.org > > Alexander Shikoff wrote: > > Oliver Fromme wrote: > > > Alexander Shikoff wrote: > > > > Wang Yi wrote: > > > > > Alexander Shikoff wrote: > > > > > > I have Apacer Flash: > > > > > > > > > > > > umass0: vendor 0x1005 USB FLASH DRIVE, rev 2.00/1.00, addr 2 > > > > > > da0 at umass-sim0 bus 0 target 0 lun 0 > > > > > > da0: < USB FLASH DRIVE 34CH> Removable Direct Access SCSI-0 device > > > > > > da0: 40.000MB/s transfers > > > > > > da0: 3936MB (8060928 512 byte sectors: 255H 63S/T 501C) > > > > > > > > > > > > Writing to this device is very slooooow. > > > > > > > > > > > > Time taken to copy file of 1,4G is near 30 min. > > > > > > > > > > Did you try it under Windows? How time does it spend? > > > > > > > > You may laugh but I have no Windows-based boxes with USB 2.0... :) > > > > Whatever it seems that this Apacer flash drive under Windows and USB 1.0 > > > > is faster than under FreeBSD and USB 2.0... > > > > > > > > Soon I will have a possibility to compare Apacer 4GB with Transcend > > > > flash. I'll report detailed results here. > > > > > > Are you sure that your USB device supports hi-speed? > > http://www.apacer.com/en/products/Handy_Steno_AH320_features.htm > > And is it connected to your ehci device (not ohci/uhci)? > (To find out you have to look at "dmesg" an "sysctl dev".) > > E.g. I have this one: > > umass0: vendor 0x090c Cn Memory, rev 2.00/11.00, addr 2 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: < Cn Memory 1100> Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 1935MB (3963904 512 byte sectors: 255H 63S/T 246C) > > dev.umass.0.%parent: uhub4 > dev.uhub.4.%parent: usb4 > > usb4: EHCI version 1.0 > usb4: on ehci0 > uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 > ehci0: mem 0xb0040000-0xb00403ff irq 23 at device 29.7 on pci0 > > i.e. umass0 is connected to uhub4 which is a child of usb4 > which belongs to ehci0. > > That stick has about 20 Mbit/s write and 30 Mbit/s read > speed. That's not terribly fast either, but definitely > beyond the 12 Mbit/s limit of full-speed devices. I can > fill that 2 GB stick up in about 15 minutes. The system > CPU is 95% during that, so I assume it's the USB stick > that's the limiting factor. > > However, it would be interesting to test the performance > with HPS' new USB code. Well, I have learned a bit more about the performance I have been seeing. Whether it is common to Alexander's problem, I can't say, but I am suspicious. First, my devices that were running so slow are formatted as FAT32. This is most common for such devices, but I am not sure if that is the case for all reported systems. After batting against a wall for a time I tried running fsck_msdosfs on the slice. After running it my transfer rate went from about .2 MB/sec to about 17 MB/sec. It moved the drive from useless for files of any size to at least reasonable to use. Oddly, fsck_msdosfs reported no errors. Also, oddly, the writes before running fsck were all successful and the drive worked fine. Under Windows, the drive was fine before the fsck, so something was seriously upsetting FreeBSD that did not impact Windows. In any case, my drive is happy again. USB drives are often disconnected while mounted and so this may turn out to be a very common issue. Since FAT drives are not "marked" as unclean like FFS systems, this is easy to over-look. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1173121555_18113P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFF7GoTkn3rs5h7N1ERAq33AJ0Y62o+b4dUWNlEzCB4OrtPaP2CWQCfUH+w AagSKtNF04IaJSIL3VDZV6E= =70Mj -----END PGP SIGNATURE----- --==_Exmh_1173121555_18113P--