Re: very, very slow usb data transfer speed on 3.7

2005-10-12 Thread Andrew Atrens

Andreas Bihlmaier wrote:

-- [EMAIL PROTECTED]: ~ (17:39) --
# dd if=/dev/wd0c of=/dev/null bs=819200 count=20
20+0 records in
20+0 records out
16384000 bytes transferred in 0.711 secs (23012820 bytes/sec)


recall the old speed with apm0: -

-- [EMAIL PROTECTED]: ~ (17:13) --
# dd if=/dev/wd0c of=/dev/null bs=819200 count=20
20+0 records in
20+0 records out
16384000 bytes transferred in 1.129 secs (14509606 bytes/sec)



 


that's pretty harsh if other people can reproduce it. :(


Incidentally usb transfers *weren't* improved by removing apm0 -

-- [EMAIL PROTECTED]: ~ (17:39) --
# dd if=/dev/sd0c of=/dev/null bs=819200 count=20
20+0 records in
20+0 records out
16384000 bytes transferred in 6.017 secs (2722653 bytes/sec)

so there's some other factor limiting those.




I'm getting the same speed on a snapshot from 09/21 with amd64 on a brand new
amd 64 3800+.

Lately I was copying around 40G of data onto a usb 2.0 hard disk (yes it was
attached to EHCI) and wondered why it took so long, but I didn't pursue the
issue further.

I also tried with different blocksizes and to eliminate the issue of a too
short benchmark I ran for a couple of minutes (about count=500).


Actually  wait a minute ... /dev/sd0c and /dev/wd0c ?
Are you SUPPOSED to read of a block device ?
SHOULDN'T it be /dev/rsd0c and /dev/rwd0c ???
		^			^ RAW DEVICE 


With the raw devices the speed looks QUITE different:

BLOCK DEVICE:
sudo dd if=/dev/wd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 16.957 secs (15458831 bytes/sec)
# Top shows CPU usage as 28.7% system, 27.9% interrupt, 41.9% idle

RAW DEVICE:
sudo dd if=/dev/rwd0c of=/dev/null bs=512k count=200
200+0 records in
200+0 records out
104857600 bytes transferred in 1.787 secs (58666485 bytes/sec)
# Top shows CPU usage as 4.6% system,  5.4% interrupt, 90.0% idle


(same with USB device)
BLOCK DEVICE:
sudo dd if=/dev/sd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 96.561 secs (2714791 bytes/sec)
# Top shows CPU usage as 4.7% system,  10.8% interrupt, 84.6% idle

RAW DEVICE:
sudo dd if=/dev/rsd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 19.015 secs (13785462 bytes/sec)
# Top shows CPU usage as 1.6% system,  2.3% interrupt, 96.1% idle


I'm sorry if I understood something wrong, but my understanding was/is that you
only use RAW devices with dd (since it uses it's own blocks ).
Please tell me if I'm wrong, since (right) knowledge is valueable!


I think you're right. I've been in the FreeBSD/DragonFly world for about 11 
years
now and about 5 years ago FreeBSD ripped out block device support so that block
devices are now really just character devices.

From your observations in OpenBSD block devices are clearly still block devices 
;) ..

Since I've only being using it for about a week now I can still claim to be a
newbie on OpenBSD. :O  but not for much longer. :)

Incidentally, I now get (DragonFly) -

# dd if=/dev/da0 of=/dev/null bs=8192000 count=10
10+0 records in
10+0 records out
8192 bytes transferred in 5.940737 secs (13789535 bytes/sec)

and on OpenBSD 3.7-stable I get -

# dd if=/dev/rsd0c of=/dev/null bs=8192000 count=10
10+0 records in
10+0 records out
8192 bytes transferred in 3.798 secs (21563802 bytes/sec)

which is quite impressive!

Woohoo!

Thanks Andreas!

Andrew.



Re: very, very slow usb data transfer speed on 3.7

2005-10-12 Thread Jeff Ross

On Tue, 11 Oct 2005, Andrew Atrens wrote:


I don't see the 'EHCI' controller in there anywhere. :(

UHCI == usb1.1
EHCI == usb2.0

Top speed for usb1.1 is roughly 1MB/s. Your getting that. :|

Two possibilities - your mobo doesn't do usb2.0 - or the ehci
device probe isn't grokking your hardware.

Andrew.



Thank you Andrew and Peter for the explanation of why that drive is so 
slow.  I inherited it at work.  It's also got a firewire interface, so 
perhaps when firewire support comes along it will actually be usable.


Jeff



Jeff Ross wrote:

 I've got a USB external drive that is virtually unusable because it is so
 slow.

 mount

 dev/sd0a on / type ffs (local)
 /dev/sd0p on /backup type ffs (local, nodev, nosuid, softdep)
 /dev/sd0o on /destdir type ffs (local, nodev, nosuid, softdep)
 /dev/sd0d on /home type ffs (local, nodev, nosuid, softdep)
 /dev/sd0n on /releasedir type ffs (local, nodev, nosuid, softdep)
 /dev/sd0e on /tmp type ffs (local, nodev, nosuid, softdep)
 /dev/sd0f on /usr type ffs (local, nodev, softdep)
 /dev/sd0g on /usr/X11R6 type ffs (local, nodev, softdep)
 /dev/sd0h on /usr/local type ffs (local, nodev, softdep)
 /dev/sd0i on /cvs type ffs (local, nodev, nosuid, softdep)
 /dev/sd0j on /usr/src type ffs (local, nodev, nosuid, softdep)
 /dev/sd0k on /var type ffs (local, nodev, nosuid, softdep)
 /dev/sd0l on /var/qmail/bin type ffs (local, nodev, softdep)
 /dev/sd0m on /var/qmail/queue type ffs (local, nodev, nosuid)
 /dev/sd1a on /log type ffs (local, nodev, nosuid, softdep)
 /dev/sd1d on /offline type ffs (local, nodev, nosuid, softdep)
 /dev/sd1e on /wal type ffs (local, nodev, nosuid, softdep)
 mfs:13470 on /var/mfs type mfs (asynchronous, local, size=200
 512-blocks)
 /dev/sd2a on /usb_drive type ffs (local)

 (write a file to the usb drive)

 time sudo dd if=/dev/zero of=/usb_drive/test_file count=100

 100+0 records in
 100+0 records out
 51200 bytes transferred in 452.234 secs (1132156 bytes/sec)
 7m32.69s real 0m0.51s user 0m3.88s system

 (write a file to the crappy 3WARE RAID1)

 time sudo dd if=/dev/zero of=/offline/test_file count=100
 100+0 records in
 100+0 records out
 51200 bytes transferred in 9.298 secs (55064036 bytes/sec)
 0m13.68s real 0m0.58s user 0m3.78s system

 dmesg:

 OpenBSD 3.8-current (GENERIC) #0: Wed Sep 14 22:05:15 MDT 2005
 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0:  Intel(R) Xeon(TM) CPU 2.66GHz (GenuineIntel 686-class) 2.67 GHz
cpu0:
 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID
 real mem  = 2147000320 (2096680K)
 avail mem = 1953087488 (1907312K)
 using 4278 buffers containing 107454464 bytes (104936K) of memory
 mainbus0 (root)
 bios0 at mainbus0: AT/286+(00) BIOS, date 02/04/03, BIOS32 rev. 0 @
 0xf0010
 pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0:  PCI IRQ Routing Table rev 1.0 @ 0xf2fb0/256 (14 entries)
pcibios0:  PCI Interrupt Router at 000:31:0 (Intel 82801CA LPC rev 0x00)
pcibios0:  PCI bus #4 is the last bus
 bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9800/0x800
 0xca000/0x1800
 cpu0 at mainbus0
 pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
 pchb0 at pci0 dev 0 function 0 Intel E7501 MCH Host rev 0x01
 ppb0 at pci0 dev 2 function 0 Intel E7500 MCH rev 0x01
 pci1 at ppb0 bus 1
 Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 28 function 0 not configured
 ppb1 at pci1 dev 29 function 0 Intel 82870P2 PCI-PCI rev 0x04
 pci2 at ppb1 bus 2
 em0 at pci2 dev 1 function 0 Intel PRO/1000MT (82545EM) rev 0x01: irq
 10, address: 00:e0:81:28:e9:71
 Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 30 function 0 not configured
 ppb2 at pci1 dev 31 function 0 Intel 82870P2 PCI-PCI rev 0x04
 pci3 at ppb2 bus 3
 ahc1 at pci3 dev 3 function 0 Adaptec AHA-29160 U160 rev 0x02: irq 10
 scsibus0 at ahc1: 16 targets
 st0 at scsibus0 targ 6 lun 0: SEAGATE, DAT 9SP40-000, 910B SCSI3
 1/sequential removable
 st0: density code 0x26, 512-byte blocks, write-enabled
 twe0 at pci3 dev 6 function 0 3ware Escalade IDE RAID rev 0x01: irq 10
 twe0: Escalade V1.3
 scsibus1 at twe0: 16 targets
 sd0 at scsibus1 targ 0 lun 0: 3WARE, Host drive #00,  SCSI2 0/direct
 fixed
 sd0: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec
 total
 sd1 at scsibus1 targ 2 lun 0: 3WARE, Host drive #02,  SCSI2 0/direct
 fixed
 sd1: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec
 total
 uhci0 at pci0 dev 29 function 0 Intel 82801CA/CAM USB rev 0x02: irq 10
 usb0 at uhci0: USB revision 1.0
 uhub0 at usb0
uhub0:  Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0:  2 ports with 2 removable, self powered
 uhci1 at pci0 dev 29 function 1 Intel 82801CA/CAM USB rev 0x02: irq 9
 usb1 at uhci1: USB revision 1.0
 uhub1 at usb1
uhub1:  Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1:  2 ports with 2 removable, self powered
 uhci2 at pci0 dev 29 function 2 Intel 82801CA/CAM USB rev 0x02: 

very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Andrew Atrens

Hey guys!

I'm running 3.7 and am getting really, really crappy usb throughput :( -

# dd if=/dev/sd0c of=/dev/null bs=819200 count=100
100+0 records in
100+0 records out
8192 bytes transferred in 175.970 secs (465533 bytes/sec)


Here's an excerpt from my dmesg -

uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 9
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 3
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: single transaction translator
uhub3: 6 ports with 6 removable, self powered
...
umass0 at uhub3 port 2 configuration 1 interface 0
umass0: vendor 0x0457 USB Mass Storage Device, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: OCZ, ET1208AD, 1.0 SCSI2 0/direct removable
sd0: 2000MB, 2000 cyl, 64 head, 32 sec, 512 bytes/sec, 4096000 sec total


Looks like sd0 is attached to the EHCI controller. On DragonflyBSD, same h/w,
I get 13MB/s when I use ehci ..

-- [EMAIL PROTECTED]: /usr/src/sys/i386/conf (11:09) --
# dd if=/dev/da0 of=/dev/null bs=8192000 count=100
100+0 records in
100+0 records out
81920 bytes transferred in 59.371990 secs (13797752 bytes/sec)

when I use uhci on Dragonfly, I get -

-- [EMAIL PROTECTED]: /home/atrens (11:07) --
# dd if=/dev/da0 bs=8192000 of=/dev/null count=100
^C5+0 records in
5+0 records out
4096 bytes transferred in 45.750635 secs (895288 bytes/sec)

which is still double what I'm seeing on OpenBSD 3.7


Hope it's something dumb on my side (and therefore easy to fix) :( ...


Andrew.



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Marco Peereboom
Yes dumb.  Where are the whole dmesg?

If you had sent them we could have told you if you ran into the hlt hlt bug.

On Tue, Oct 11, 2005 at 12:20:45PM -0400, Andrew Atrens wrote:
 Hey guys!
 
 I'm running 3.7 and am getting really, really crappy usb throughput :( -
 
 # dd if=/dev/sd0c of=/dev/null bs=819200 count=100
 100+0 records in
 100+0 records out
 8192 bytes transferred in 175.970 secs (465533 bytes/sec)
 
 
 Here's an excerpt from my dmesg -
 
 uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
 usb0 at uhci0: USB revision 1.0
 uhub0 at usb0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 10
 usb1 at uhci1: USB revision 1.0
 uhub1 at usb1
 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 9
 usb2 at uhci2: USB revision 1.0
 uhub2 at usb2
 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 3
 ehci0: EHCI version 1.0
 ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
 usb3 at ehci0: USB revision 2.0
 uhub3 at usb3
 uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub3: single transaction translator
 uhub3: 6 ports with 6 removable, self powered
 ...
 umass0 at uhub3 port 2 configuration 1 interface 0
 umass0: vendor 0x0457 USB Mass Storage Device, rev 2.00/1.00, addr 2
 umass0: using SCSI over Bulk-Only
 scsibus1 at umass0: 2 targets
 sd0 at scsibus1 targ 1 lun 0: OCZ, ET1208AD, 1.0 SCSI2 0/direct removable
 sd0: 2000MB, 2000 cyl, 64 head, 32 sec, 512 bytes/sec, 4096000 sec total
 
 
 Looks like sd0 is attached to the EHCI controller. On DragonflyBSD, same 
 h/w,
 I get 13MB/s when I use ehci ..
 
 -- [EMAIL PROTECTED]: /usr/src/sys/i386/conf (11:09) --
 # dd if=/dev/da0 of=/dev/null bs=8192000 count=100
 100+0 records in
 100+0 records out
 81920 bytes transferred in 59.371990 secs (13797752 bytes/sec)
 
 when I use uhci on Dragonfly, I get -
 
 -- [EMAIL PROTECTED]: /home/atrens (11:07) --
 # dd if=/dev/da0 bs=8192000 of=/dev/null count=100
 ^C5+0 records in
 5+0 records out
 4096 bytes transferred in 45.750635 secs (895288 bytes/sec)
 
 which is still double what I'm seeing on OpenBSD 3.7
 
 
 Hope it's something dumb on my side (and therefore easy to fix) :( ...
 
 
 Andrew.



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Andrew Atrens

Just for fun I ran 'top' during the said slow transfer, and it says -

load averages:  0.55,  0.20,  0.12   
11:41:59
22 processes:  21 idle, 1 on processor
CPU states:  0.2% user,  0.0% nice,  0.2% system,  0.8% interrupt, 98.9% idle
Memory: Real: 8932K/100M act/tot  Free: 904M  Swap: 0K/2048M used/tot

Can someone point me to the cvs commit that fixes 'hlt hlt'. I'm thinking 
(hoping)
it could easily be applied on top of 3.7 Release.

Andrew.



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Stuart Henderson

--On 11 October 2005 12:39 -0400, Andrew Atrens wrote:


Can someone point me to the cvs commit that fixes 'hlt hlt'. I'm
thinking (hoping) it could easily be applied on top of 3.7 Release.


google hlt hlt openbsd gives this:
http://marc.theaimsgroup.com/?l=openbsd-cvsm=111859519015510w=2



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Jasper Lievisse Adriaanse
On Tue, 11 Oct 2005 12:30:30 -0400
Andrew Atrens [EMAIL PROTECTED] wrote:

 Marco Peereboom wrote:
  Yes dumb.  Where are the whole dmesg?
 
 haha!
 
  If you had sent them we could have told you if you ran into the hlt hlt bug.
 
 Sure here it is -
 
 
 -- [EMAIL PROTECTED]: /usr/src/sys/arch/i386/conf (11:35) --
 # dmesg
 OpenBSD 3.7 (BOOKEND) #0: Wed Oct  5 14:02:08 EST 2005
  [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/BOOKEND

How about trying it with a GENRIC kernel?

snip 
 
 
 
  
  On Tue, Oct 11, 2005 at 12:20:45PM -0400, Andrew Atrens wrote:
  
 Hey guys!
 
 I'm running 3.7 and am getting really, really crappy usb throughput :( -
 
 # dd if=/dev/sd0c of=/dev/null bs=819200 count=100
 100+0 records in
 100+0 records out
 8192 bytes transferred in 175.970 secs (465533 bytes/sec)
 
 
 Here's an excerpt from my dmesg -
 
 uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
 usb0 at uhci0: USB revision 1.0
 uhub0 at usb0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 10
 usb1 at uhci1: USB revision 1.0
 uhub1 at usb1
 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 9
 usb2 at uhci2: USB revision 1.0
 uhub2 at usb2
 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 3
 ehci0: EHCI version 1.0
 ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
 usb3 at ehci0: USB revision 2.0
 uhub3 at usb3
 uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub3: single transaction translator
 uhub3: 6 ports with 6 removable, self powered
 ...
 umass0 at uhub3 port 2 configuration 1 interface 0
 umass0: vendor 0x0457 USB Mass Storage Device, rev 2.00/1.00, addr 2
 umass0: using SCSI over Bulk-Only
 scsibus1 at umass0: 2 targets
 sd0 at scsibus1 targ 1 lun 0: OCZ, ET1208AD, 1.0 SCSI2 0/direct removable
 sd0: 2000MB, 2000 cyl, 64 head, 32 sec, 512 bytes/sec, 4096000 sec total
 
 
 Looks like sd0 is attached to the EHCI controller. On DragonflyBSD, same 
 h/w,
 I get 13MB/s when I use ehci ..
 
 -- [EMAIL PROTECTED]: /usr/src/sys/i386/conf (11:09) --
 # dd if=/dev/da0 of=/dev/null bs=8192000 count=100
 100+0 records in
 100+0 records out
 81920 bytes transferred in 59.371990 secs (13797752 bytes/sec)
 
 when I use uhci on Dragonfly, I get -
 
 -- [EMAIL PROTECTED]: /home/atrens (11:07) --
 # dd if=/dev/da0 bs=8192000 of=/dev/null count=100
 ^C5+0 records in
 5+0 records out
 4096 bytes transferred in 45.750635 secs (895288 bytes/sec)
 
 which is still double what I'm seeing on OpenBSD 3.7
 
 
 Hope it's something dumb on my side (and therefore easy to fix) :( ...
 
 
 Andrew.
 


-- 
Security is decided by quality -- Theo de Raadt



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Michael Shalayeff
Making, drinking tea and reading an opus magnum from Andrew Atrens:
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
 Okay, I've upgraded to a kernel with tag=OPENBSD_3_7  which looks to be
 the -stable or 'patch' tag, and while the situation has improved, performance
 is still off by a factor of 5.

speaking about your ide benchmarks ...
you cann seriously oncsider any measurment that too ~1sec
try running it for at least 10 seconds

 (I added the wd test below because with the 3.7 kernel it (interestingly) 
 matched
   that of the flash stick. Now with the -stable kernel wd is performing 
 better,
   as is the flash stick, but both are still too slow. )
 
 -- [EMAIL PROTECTED]: ~ (17:13) --
 # dd if=/dev/wd0c of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 1.129 secs (14509606 bytes/sec)
 
 -- [EMAIL PROTECTED]: ~ (17:14) --
 # dd if=/dev/sd0c of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 6.017 secs (2722767 bytes/sec)
 
 On DragonFly-Stable for comparisons, the flash stick is *fast* -
 
 -- [EMAIL PROTECTED]: /usr/src/sys/compile/AB-MOBILE-FAST_IPSEC (18:11) --
 # dd if=/dev/da0 of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 1.223731 secs (13388563 bytes/sec)
 
 
 I have 3 identical boxen here (they're Dell GX240's). For fun
 I just bounced onto the third box (FreeBSD 4.9) and tried the ata test -
 
 -- [EMAIL PROTECTED]: /home/atrens (18:24) --
 # dd if=/dev/ad0 of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 0.336737 secs (48655194 bytes/sec)
 
 I'm not sure what this means, because we're now comparing completely
 different ata subsystems - but the FreeBSD ata subsystem looks to be
 3x faster than 3.7.
 
 This is the ata disk in question, btw -
 wd0 at pciide0 channel 0 drive 0: Maxtor 6Y080L0
 wd0: 16-sector PIO, LBA, 78167MB, 160086528 sectors
 wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
 
 I'm curious what performance other people are getting with this disk... :)
 since both subsystems (scsi/usb and ide) have both linearly improved,
 but, let's be a bit fuzzy and say, are both still off where they should be
 by *roughly* a factor of 4.
 
 Andrew.
 


-- 
paranoic mickey   (my employers have changed but, the name has remained)



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Andrew Atrens

Michael Shalayeff wrote:

Making, drinking tea and reading an opus magnum from Andrew Atrens:
[Charset ISO-8859-1 unsupported, filtering to ASCII...]


Okay, I've upgraded to a kernel with tag=OPENBSD_3_7  which looks to be
the -stable or 'patch' tag, and while the situation has improved, performance
is still off by a factor of 5.



speaking about your ide benchmarks ...
you cann seriously oncsider any measurment that too ~1sec
try running it for at least 10 seconds


Agreed. But I was lazy. Here ya go, kernel without apm0: -

-- [EMAIL PROTECTED]: ~ (17:56) --
# dd if=/dev/wd0c of=/dev/null bs=819200 count=400
400+0 records in
400+0 records out
32768 bytes transferred in 14.244 secs (23004549 bytes/sec)

Note the consistency with the other numbers. I ran these a number of times,
btw. :) :) :)

Andrew.



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Jeff Ross
I've got a USB external drive that is virtually unusable because it is so 
slow.


mount

dev/sd0a on / type ffs (local)
/dev/sd0p on /backup type ffs (local, nodev, nosuid, softdep)
/dev/sd0o on /destdir type ffs (local, nodev, nosuid, softdep)
/dev/sd0d on /home type ffs (local, nodev, nosuid, softdep)
/dev/sd0n on /releasedir type ffs (local, nodev, nosuid, softdep)
/dev/sd0e on /tmp type ffs (local, nodev, nosuid, softdep)
/dev/sd0f on /usr type ffs (local, nodev, softdep)
/dev/sd0g on /usr/X11R6 type ffs (local, nodev, softdep)
/dev/sd0h on /usr/local type ffs (local, nodev, softdep)
/dev/sd0i on /cvs type ffs (local, nodev, nosuid, softdep)
/dev/sd0j on /usr/src type ffs (local, nodev, nosuid, softdep)
/dev/sd0k on /var type ffs (local, nodev, nosuid, softdep)
/dev/sd0l on /var/qmail/bin type ffs (local, nodev, softdep)
/dev/sd0m on /var/qmail/queue type ffs (local, nodev, nosuid)
/dev/sd1a on /log type ffs (local, nodev, nosuid, softdep)
/dev/sd1d on /offline type ffs (local, nodev, nosuid, softdep)
/dev/sd1e on /wal type ffs (local, nodev, nosuid, softdep)
mfs:13470 on /var/mfs type mfs (asynchronous, local, size=200 512-blocks)
/dev/sd2a on /usb_drive type ffs (local)

(write a file to the usb drive)

time sudo dd if=/dev/zero of=/usb_drive/test_file count=100

100+0 records in
100+0 records out
51200 bytes transferred in 452.234 secs (1132156 bytes/sec)
7m32.69s real 0m0.51s user 0m3.88s system

(write a file to the crappy 3WARE RAID1)

time sudo dd if=/dev/zero of=/offline/test_file count=100
100+0 records in
100+0 records out
51200 bytes transferred in 9.298 secs (55064036 bytes/sec)
0m13.68s real 0m0.58s user 0m3.78s system

dmesg:

OpenBSD 3.8-current (GENERIC) #0: Wed Sep 14 22:05:15 MDT 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 2.66GHz (GenuineIntel 686-class) 2.67 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID
real mem  = 2147000320 (2096680K)
avail mem = 1953087488 (1907312K)
using 4278 buffers containing 107454464 bytes (104936K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 02/04/03, BIOS32 rev. 0 @ 0xf0010
pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf2fb0/256 (14 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82801CA LPC rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9800/0x800 0xca000/0x1800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel E7501 MCH Host rev 0x01
ppb0 at pci0 dev 2 function 0 Intel E7500 MCH rev 0x01
pci1 at ppb0 bus 1
Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 28 function 0 not configured
ppb1 at pci1 dev 29 function 0 Intel 82870P2 PCI-PCI rev 0x04
pci2 at ppb1 bus 2
em0 at pci2 dev 1 function 0 Intel PRO/1000MT (82545EM) rev 0x01: irq 10, 
address: 00:e0:81:28:e9:71
Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 30 function 0 not configured
ppb2 at pci1 dev 31 function 0 Intel 82870P2 PCI-PCI rev 0x04
pci3 at ppb2 bus 3
ahc1 at pci3 dev 3 function 0 Adaptec AHA-29160 U160 rev 0x02: irq 10
scsibus0 at ahc1: 16 targets
st0 at scsibus0 targ 6 lun 0: SEAGATE, DAT 9SP40-000, 910B SCSI3 1/sequential 
removable
st0: density code 0x26, 512-byte blocks, write-enabled
twe0 at pci3 dev 6 function 0 3ware Escalade IDE RAID rev 0x01: irq 10
twe0: Escalade V1.3
scsibus1 at twe0: 16 targets
sd0 at scsibus1 targ 0 lun 0: 3WARE, Host drive #00,  SCSI2 0/direct fixed
sd0: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec total
sd1 at scsibus1 targ 2 lun 0: 3WARE, Host drive #02,  SCSI2 0/direct fixed
sd1: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec total
uhci0 at pci0 dev 29 function 0 Intel 82801CA/CAM USB rev 0x02: irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 Intel 82801CA/CAM USB rev 0x02: irq 9
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 Intel 82801CA/CAM USB rev 0x02: irq 11
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ppb3 at pci0 dev 30 function 0 Intel 82801BA AGP rev 0x42
pci4 at ppb3 bus 4
fxp0 at pci4 dev 1 function 0 Intel 82557 rev 0x10, i82551: irq 5, address 
00:e0:81:28:e9:70
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
vga1 at pci4 dev 2 function 0 ATI Rage XL rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
fxp1 at pci4 dev 3 function 0 Intel 82557 rev 0x05, i82558: irq 11, address 
00:90:27:2a:33:a6
inphy1 at fxp1 

Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Peter Hessler
On Tue, 11 Oct 2005 17:27:27 -0600 (MDT)
Jeff Ross [EMAIL PROTECTED] wrote:

: I've got a USB external drive that is virtually unusable because it
: is so slow.
: 
[snip]

: (write a file to the usb drive)
: 
: time sudo dd if=/dev/zero of=/usb_drive/test_file count=100
: 
: 100+0 records in
: 100+0 records out
: 51200 bytes transferred in 452.234 secs (1132156 bytes/sec)
:  7m32.69s real 0m0.51s user 0m3.88s system

Over 8Mbits/sec, keep this number in mind.

: dmesg:
: 
: OpenBSD 3.8-current (GENERIC) #0: Wed Sep 14 22:05:15 MDT 2005
:  [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
...
: uhci0 at pci0 dev 29 function 0 Intel 82801CA/CAM USB rev 0x02: irq
: 10 usb0 at uhci0: USB revision 1.0
: uhub0 at usb0
: uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
: uhub0: 2 ports with 2 removable, self powered
...
: umass0 at uhub0 port 2 configuration 1 interface 0
: umass0: Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00,
: umass0: addr 2 using SCSI over Bulk-Only
: scsibus3 at umass0: 2 targets
: sd2 at scsibus3 targ 1 lun 0: WDC WD20, 00JB-00GVA0, 08.0 SCSI0 0/
: direct fixed
: sd2: 190782MB, 190782 cyl, 64 head, 32 sec, 512 bytes/sec, 390721969
:  sec total

uhci is USB1, which theoretically tops out at 11Mbits/sec.  You won't
get much faster access unless you get USB2, which tops out at 
480Mbits/sec.


-- 
It is not enough to succeed.  Others must fail.
-- Gore Vidal



Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Andrew Atrens

I don't see the 'EHCI' controller in there anywhere. :(

UHCI == usb1.1
EHCI == usb2.0

Top speed for usb1.1 is roughly 1MB/s. Your getting that. :|

Two possibilities - your mobo doesn't do usb2.0 - or the ehci
device probe isn't grokking your hardware.

Andrew.


Jeff Ross wrote:
I've got a USB external drive that is virtually unusable because it is 
so slow.


mount

dev/sd0a on / type ffs (local)
/dev/sd0p on /backup type ffs (local, nodev, nosuid, softdep)
/dev/sd0o on /destdir type ffs (local, nodev, nosuid, softdep)
/dev/sd0d on /home type ffs (local, nodev, nosuid, softdep)
/dev/sd0n on /releasedir type ffs (local, nodev, nosuid, softdep)
/dev/sd0e on /tmp type ffs (local, nodev, nosuid, softdep)
/dev/sd0f on /usr type ffs (local, nodev, softdep)
/dev/sd0g on /usr/X11R6 type ffs (local, nodev, softdep)
/dev/sd0h on /usr/local type ffs (local, nodev, softdep)
/dev/sd0i on /cvs type ffs (local, nodev, nosuid, softdep)
/dev/sd0j on /usr/src type ffs (local, nodev, nosuid, softdep)
/dev/sd0k on /var type ffs (local, nodev, nosuid, softdep)
/dev/sd0l on /var/qmail/bin type ffs (local, nodev, softdep)
/dev/sd0m on /var/qmail/queue type ffs (local, nodev, nosuid)
/dev/sd1a on /log type ffs (local, nodev, nosuid, softdep)
/dev/sd1d on /offline type ffs (local, nodev, nosuid, softdep)
/dev/sd1e on /wal type ffs (local, nodev, nosuid, softdep)
mfs:13470 on /var/mfs type mfs (asynchronous, local, size=200 
512-blocks)

/dev/sd2a on /usb_drive type ffs (local)

(write a file to the usb drive)

time sudo dd if=/dev/zero of=/usb_drive/test_file count=100

100+0 records in
100+0 records out
51200 bytes transferred in 452.234 secs (1132156 bytes/sec)
7m32.69s real 0m0.51s user 0m3.88s system

(write a file to the crappy 3WARE RAID1)

time sudo dd if=/dev/zero of=/offline/test_file count=100
100+0 records in
100+0 records out
51200 bytes transferred in 9.298 secs (55064036 bytes/sec)
0m13.68s real 0m0.58s user 0m3.78s system

dmesg:

OpenBSD 3.8-current (GENERIC) #0: Wed Sep 14 22:05:15 MDT 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 2.66GHz (GenuineIntel 686-class) 2.67 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID 


real mem  = 2147000320 (2096680K)
avail mem = 1953087488 (1907312K)
using 4278 buffers containing 107454464 bytes (104936K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 02/04/03, BIOS32 rev. 0 @ 0xf0010
pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf2fb0/256 (14 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82801CA LPC rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9800/0x800 0xca000/0x1800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel E7501 MCH Host rev 0x01
ppb0 at pci0 dev 2 function 0 Intel E7500 MCH rev 0x01
pci1 at ppb0 bus 1
Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 28 function 0 not configured
ppb1 at pci1 dev 29 function 0 Intel 82870P2 PCI-PCI rev 0x04
pci2 at ppb1 bus 2
em0 at pci2 dev 1 function 0 Intel PRO/1000MT (82545EM) rev 0x01: irq 
10, address: 00:e0:81:28:e9:71

Intel 82870P2 IOxAPIC rev 0x04 at pci1 dev 30 function 0 not configured
ppb2 at pci1 dev 31 function 0 Intel 82870P2 PCI-PCI rev 0x04
pci3 at ppb2 bus 3
ahc1 at pci3 dev 3 function 0 Adaptec AHA-29160 U160 rev 0x02: irq 10
scsibus0 at ahc1: 16 targets
st0 at scsibus0 targ 6 lun 0: SEAGATE, DAT 9SP40-000, 910B SCSI3 
1/sequential removable

st0: density code 0x26, 512-byte blocks, write-enabled
twe0 at pci3 dev 6 function 0 3ware Escalade IDE RAID rev 0x01: irq 10
twe0: Escalade V1.3
scsibus1 at twe0: 16 targets
sd0 at scsibus1 targ 0 lun 0: 3WARE, Host drive #00,  SCSI2 0/direct 
fixed
sd0: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec 
total
sd1 at scsibus1 targ 2 lun 0: 3WARE, Host drive #02,  SCSI2 0/direct 
fixed
sd1: 117799MB, 15017 cyl, 255 head, 63 sec, 512 bytes/sec, 241252672 sec 
total

uhci0 at pci0 dev 29 function 0 Intel 82801CA/CAM USB rev 0x02: irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 Intel 82801CA/CAM USB rev 0x02: irq 9
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 Intel 82801CA/CAM USB rev 0x02: irq 11
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ppb3 at pci0 dev 30 function 0 Intel 82801BA AGP rev 0x42
pci4 at ppb3 bus 4
fxp0 at pci4 dev 1 function 0 Intel 82557 rev 0x10, i82551: irq 5, 
address 00:e0:81:28:e9:70

inphy0 at fxp0 phy 1: 

Re: very, very slow usb data transfer speed on 3.7

2005-10-11 Thread Andreas Bihlmaier
 -- [EMAIL PROTECTED]: ~ (17:39) --
 # dd if=/dev/wd0c of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 0.711 secs (23012820 bytes/sec)
 
 
 recall the old speed with apm0: -
 
 -- [EMAIL PROTECTED]: ~ (17:13) --
 # dd if=/dev/wd0c of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 1.129 secs (14509606 bytes/sec)
 
 
 that's pretty harsh if other people can reproduce it. :(
 
 
 Incidentally usb transfers *weren't* improved by removing apm0 -
 
 -- [EMAIL PROTECTED]: ~ (17:39) --
 # dd if=/dev/sd0c of=/dev/null bs=819200 count=20
 20+0 records in
 20+0 records out
 16384000 bytes transferred in 6.017 secs (2722653 bytes/sec)
 
 so there's some other factor limiting those.


I'm getting the same speed on a snapshot from 09/21 with amd64 on a brand new
amd 64 3800+.

Lately I was copying around 40G of data onto a usb 2.0 hard disk (yes it was
attached to EHCI) and wondered why it took so long, but I didn't pursue the
issue further.

I also tried with different blocksizes and to eliminate the issue of a too
short benchmark I ran for a couple of minutes (about count=500).


Actually  wait a minute ... /dev/sd0c and /dev/wd0c ?
Are you SUPPOSED to read of a block device ?
SHOULDN'T it be /dev/rsd0c and /dev/rwd0c ???
^   ^ RAW 
DEVICE 

With the raw devices the speed looks QUITE different:

BLOCK DEVICE:
sudo dd if=/dev/wd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 16.957 secs (15458831 bytes/sec)
# Top shows CPU usage as 28.7% system, 27.9% interrupt, 41.9% idle

RAW DEVICE:
sudo dd if=/dev/rwd0c of=/dev/null bs=512k count=200
200+0 records in
200+0 records out
104857600 bytes transferred in 1.787 secs (58666485 bytes/sec)
# Top shows CPU usage as 4.6% system,  5.4% interrupt, 90.0% idle


(same with USB device)
BLOCK DEVICE:
sudo dd if=/dev/sd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 96.561 secs (2714791 bytes/sec)
# Top shows CPU usage as 4.7% system,  10.8% interrupt, 84.6% idle

RAW DEVICE:
sudo dd if=/dev/rsd0c of=/dev/null bs=512k count=500
500+0 records in
500+0 records out
262144000 bytes transferred in 19.015 secs (13785462 bytes/sec)
# Top shows CPU usage as 1.6% system,  2.3% interrupt, 96.1% idle


I'm sorry if I understood something wrong, but my understanding was/is that you
only use RAW devices with dd (since it uses it's own blocks ).
Please tell me if I'm wrong, since (right) knowledge is valueable!

Regards,
ahb