Getting really slow performance on umass(4) devices. It takes about 20 minutes to write 1.4G, while the same job takes about 2.5 minutes on Ubuntu and Windows (on the same hardware).
The device attaches to an EHCI hub but, with regards to performance, it acts like it's attached to an UHCI hub. Please see script below. Script started on Sun Jun 7 14:51:41 2009 $ dmesg | tail -6 root on wd0a swap on wd0b dump on wd0b umass0 at uhub0 port 1 configuration 1 interface 0 "silicon -power" rev 2.00/1.10 addr 2 umass0: using SCSI over Bulk-Only scsibus2 at umass0: 2 targets, initiator 0 sd0 at scsibus2 targ 1 lun 0: <silicon, -power, 0.00> SCSI0 0/direct removable sd0: 3822MB, 512 bytes/sec, 7827456 sec total $ usbdevs addr 1: EHCI root hub, Intel addr 2: -power, silicon addr 1: EHCI root hub, Intel addr 1: UHCI root hub, Intel addr 1: UHCI root hub, Intel addr 1: UHCI root hub, Intel addr 2: Back-UPS CS 500 FW:808.q8.I USB FW:q8, American Power Conversion addr 3: hp LaserJet 1010, Hewlett-Packard addr 1: UHCI root hub, Intel addr 2: USB-PS/2 Optical Mouse, Logitech $ sudo disklabel -E sd0 Password: disklabel: warning, DOS partition table with no valid OpenBSD partition Label editor (enter '?' for help at any prompt) > p OpenBSD area: 63-7827456; size: 7827393; free: 7827393 # size offset fstype [fsize bsize cpg] c: 7827456 0 unused > a a offset: [63] size: [7827393] FS type: [4.2BSD] > w > q No label changes. $ sudo newfs /dev/rsd0a /dev/rsd0a: 3822.0MB in 7827392 sectors of 512 bytes 19 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each super-block backups (for fsck -b #) at: 32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624, 3317280, 3731936, 4146592, 4561248, 4975904, 5390560, 5805216, 6219872, 6634528, 7049184, 7463840, $ sudo mount /dev/sd0a /mnt/umass0 $ mount /dev/wd0a on / type ffs (local, softdep) /dev/wd0d on /usr type ffs (local, nodev, softdep) /dev/wd0e on /home type ffs (local, nodev, nosuid, softdep) /dev/sd0a on /mnt/umass0 type ffs (local) $ df -h Filesystem Size Used Avail Capacity Mounted on /dev/wd0a 9.8G 85.1M 9.3G 1% / /dev/wd0d 29.5G 5.2G 22.9G 18% /usr /dev/wd0e 123G 16.1G 101G 14% /home /dev/sd0a 3.7G 2.0K 3.5G 0% /mnt/umass0 $ pwd /home/tpfaff $ ls -lh movie.avi -rw-r--r-- 1 tpfaff users 1.4G Jun 7 14:46 movie.avi $ time sudo cp movie.avi /mnt/umass0 19m53.02s real 0m0.00s user 0m6.25s system $ sudo umount /mnt/umass0 Password: $ time sudo dd if=/dev/zero of=/dev/sd0a bs=1m count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 90.851 secs (1154162 bytes/sec) 1m30.94s real 0m0.00s user 0m0.08s system $ sudo time dd if=/dev/sd0a of=/dev/null bs=1m count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 6.636 secs (15801186 bytes/sec) 0m6.65s real 0m0.00s user 0m0.25s system $ exit Script done on Sun Jun 7 15:17:07 2009 $ dmesg OpenBSD 4.5-current (GENERIC.MP) #18: Fri May 22 11:42:25 CEST 2009 tpf...@ws.tp76.info:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 3152609280 (3006MB) avail mem = 3045048320 (2903MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf06b0 (76 entries) bios0: vendor American Megatrends Inc. version "1704" date 11/27/2007 bios0: ASUSTeK Computer INC. P5B-E acpi0 at bios0: rev 2 acpi0: tables DSDT FACP APIC MCFG OEMB HPET acpi0: wakeup devices P0P2(S4) P0P1(S4) UAR1(S4) PS2K(S4) PS2M(S4) EUSB(S4) USBE(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2135.34 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu0: 2MB 64b/line 8-way L2 cache cpu0: apic clock running at 269MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2156.39 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu1: 2MB 64b/line 8-way L2 cache ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (P0P2) acpiprt2 at acpi0: bus 5 (P0P1) acpiprt3 at acpi0: bus 4 (P0P4) acpiprt4 at acpi0: bus -1 (P0P5) acpiprt5 at acpi0: bus -1 (P0P6) acpiprt6 at acpi0: bus 3 (P0P7) acpiprt7 at acpi0: bus 2 (P0P8) acpicpu0 at acpi0 acpicpu1 at acpi0 acpibtn0 at acpi0: PWRB pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel 82G965 Host" rev 0x02 ppb0 at pci0 dev 1 function 0 "Intel 82G965 PCIE" rev 0x02: apic 2 int 16 (irq 11) pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 7600 GT" rev 0xa1 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 16 (irq 11) uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 17 (irq 5) ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: apic 2 int 22 (irq 3) azalia0: codecs: Analog Devices AD1988A audio0 at azalia0 ppb1 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11) pci2 at ppb1 bus 4 ppb2 at pci0 dev 28 function 3 "Intel 82801H PCIE" rev 0x02: apic 2 int 19 (irq 10) pci3 at ppb2 bus 3 age0 at pci3 dev 0 function 0 "Attansic Technology L1" rev 0xb0: apic 2 int 19 (irq 10), address 00:18:f3:9d:7d:04 atphy0 at age0 phy 0: F1 10/100/1000 PHY, rev. 5 ppb3 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11) pci4 at ppb3 bus 2 jmb0 at pci4 dev 0 function 0 "JMicron JMB363 IDE/SATA" rev 0x02 ahci0 at jmb0: apic 2 int 16 (irq 11), AHCI 1.0 scsibus0 at ahci0: 32 targets pciide0 at jmb0: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI pciide0: using apic 2 int 16 (irq 11) for native-PCI interrupt atapiscsi0 at pciide0 channel 0 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <PLEXTOR, DVDR PX-740A, 1.00> ATAPI 5/cdrom removable cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 pciide0: channel 1 disabled (no drives) uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7) uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 19 (irq 10) uhci4 at pci0 dev 29 function 2 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15) ehci1 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7) usb1 at ehci1: USB revision 2.0 uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb4 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2 pci5 at ppb4 bus 5 puc0 at pci5 dev 1 function 0 "NetMos Nm9835" rev 0x01: ports: 1 com com2 at puc0 port 0 apic 2 int 22 (irq 3): ns16550a, 16 byte fifo re0 at pci5 dev 2 function 0 "D-Link Systems DGE-528T" rev 0x10: RTL8169/8110SB (0x1000), apic 2 int 23 (irq 7), address 00:21:91:12:15:03 rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3 pcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02 pciide1 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI pciide1: using apic 2 int 19 (irq 10) for native-PCI interrupt wd0 at pciide1 channel 0 drive 0: <SAMSUNG HD321KJ> wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5 ichiic0 at pci0 dev 31 function 3 "Intel 82801H SMBus" rev 0x02: apic 2 int 18 (irq 10) iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 spdmem1 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-5300CL5 spdmem2 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 spdmem3 at iic0 addr 0x53: 1GB DDR2 SDRAM non-parity PC2-5300CL5 pciide2 at pci0 dev 31 function 5 "Intel 82801H SATA" rev 0x02: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI pciide2: using apic 2 int 19 (irq 10) for native-PCI interrupt usb2 at uhci0: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci1: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci2: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb5 at uhci3: USB revision 1.0 uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb6 at uhci4: USB revision 1.0 uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 wbsio0 at isa0 port 0x2e/2: W83627DHG rev 0x23 lm1 at wbsio0 port 0x290/8: W83627DHG mtrr: Pentium Pro MTRR support uhidev0 at uhub5 port 2 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2 uhidev0: iclass 3/1 ums0 at uhidev0: 3 buttons, Z dir wsmouse0 at ums0 mux 0 ugen0 at uhub4 port 1 "American Power Conversion Back-UPS CS 500 FW:808.q8.I USB FW:q8" rev 1.10/0.06 addr 2 ulpt0 at uhub4 port 2 configuration 1 interface 0 "Hewlett-Packard hp LaserJet 1010" rev 1.10/1.00 addr 3 ulpt0: using bi-directional mode softraid0 at root root on wd0a swap on wd0b dump on wd0b