[opensuse] USB performance
Hello folks. I am trying to track a performance bottleneck on the USB interface. The strange thing is that I sometimes get good performance and other times bad performance. For example, I have a memory stick which should go about 5MB/s for write.
From this stick, I sometimes get the promised 5MB/s. But sometimes I get only about 120kb/s. It is the same stick, plugged into the same port, without reboots. But for some strange reason, sometimes it is recognized as a "full speed device" (this is the slow mode) and sometimes as a "high speed device" (this is the fast mode). Please check the two excerpts from /var/log/messages below.
This is opensuse-11.2 running on a 2GHz Athlon dual core 4850e with USB2.0 on-board. Any ideas? Jan 13 17:15:42 raven kernel: [4988831.356060] usb 6-3: new full speed USB device using ohci_hcd and address 10 Jan 13 17:15:42 raven kernel: [4988831.496420] usb 6-3: not running at top speed; connect to a high speed hub Jan 13 17:15:42 raven kernel: [4988831.508147] usb 6-3: New USB device found, idVendor=1307, idProduct=0165 Jan 13 17:15:42 raven kernel: [4988831.508191] usb 6-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jan 13 17:15:42 raven kernel: [4988831.508208] usb 6-3: Product: USB Mass Storage Device Jan 13 17:15:42 raven kernel: [4988831.508226] usb 6-3: Manufacturer: USBest Technology Jan 13 17:15:42 raven kernel: [4988831.508243] usb 6-3: SerialNumber: 00000000000025 Jan 13 17:15:42 raven kernel: [4988831.508513] usb 6-3: configuration #1 chosen from 1 choice Jan 13 17:15:42 raven kernel: [4988831.510720] scsi16 : SCSI emulation for USB Mass Storage devices Jan 13 17:15:42 raven kernel: [4988831.511044] usb-storage: device found at 10 Jan 13 17:15:42 raven kernel: [4988831.511051] usb-storage: waiting for device to settle before scanning Jan 13 17:15:43 raven kernel: [4988832.519175] scsi 16:0:0:0: Direct-Access Ut165 USB2FlashStorage 0.00 PQ: 0 ANSI: 2 Jan 13 17:15:43 raven kernel: [4988832.532181] usb-storage: device scan complete Jan 14 07:26:51 raven kernel: [5039900.748961] usb 6-3: USB disconnect, address 10 Jan 14 18:47:12 raven kernel: [5080721.042097] usb 2-6: new high speed USB device using ehci_hcd and address 8 Jan 14 18:47:12 raven kernel: [5080721.158891] usb 2-6: New USB device found, idVendor=1307, idProduct=0165 Jan 14 18:47:12 raven kernel: [5080721.158936] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jan 14 18:47:12 raven kernel: [5080721.158953] usb 2-6: Product: USB Mass Storage Device Jan 14 18:47:12 raven kernel: [5080721.158971] usb 2-6: Manufacturer: USBest Technology Jan 14 18:47:12 raven kernel: [5080721.158988] usb 2-6: SerialNumber: 00000000000025 Jan 14 18:47:12 raven kernel: [5080721.159415] usb 2-6: configuration #1 chosen from 1 choice Jan 14 18:47:12 raven kernel: [5080721.170350] scsi17 : SCSI emulation for USB Mass Storage devices Jan 14 18:47:12 raven kernel: [5080721.170657] usb-storage: device found at 8 Jan 14 18:47:12 raven kernel: [5080721.170664] usb-storage: waiting for device to settle before scanning Jan 14 18:47:13 raven kernel: [5080722.171201] scsi 17:0:0:0: Direct-Access Ut165 USB2FlashStorage 0.00 PQ: 0 ANSI: 2 Jan 14 18:47:13 raven kernel: [5080722.172581] usb-storage: device scan complete -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/14/2011 10:06 AM, Josef Wolf wrote:
Hello folks.
I am trying to track a performance bottleneck on the USB interface. The strange thing is that I sometimes get good performance and other times bad performance.
For example, I have a memory stick which should go about 5MB/s for write.
From this stick, I sometimes get the promised 5MB/s. But sometimes I get only about 120kb/s. It is the same stick, plugged into the same port, without reboots. But for some strange reason, sometimes it is recognized as a "full speed device" (this is the slow mode) and sometimes as a "high speed device" (this is the fast mode). Please check the two excerpts from /var/log/messages below.
This is opensuse-11.2 running on a 2GHz Athlon dual core 4850e with USB2.0 on-board.
Any ideas?
Jan 13 17:15:42 raven kernel: [4988831.356060] usb 6-3: new full speed USB device using ohci_hcd and address 10 Jan 13 17:15:42 raven kernel: [4988831.496420] usb 6-3: not running at top speed; connect to a high speed hub
Jan 14 18:47:12 raven kernel: [5080721.042097] usb 2-6: new high speed USB device using ehci_hcd and address 8 Jan 14 18:47:12 raven kernel: [5080721.158891] usb 2-6: New USB device found, idVendor=1307, idProduct=0165
You say they are being plugged into the EXACT SAME PORT but your examples from two consecutive days suggests they were actually in different ports. Its not unusual for machines to have ports in the same machine that use different controllers even when they sit close to each other. However, if you are very sure it is on the same port, is it possible that something else plugged in to another port on the same header would pull both ports down to USB 1.1 speed. Early USB 2.0 implementations did not not have good transaction translators on each port. Any slow speed device on the same controller could bring the whole bus down to 12mg. See this article http://www.analogzone.com/iot_0203.pdf -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jan 14, 2011 at 02:51:40PM -0800, John Andersen wrote:
On 1/14/2011 10:06 AM, Josef Wolf wrote:
Hello folks.
I am trying to track a performance bottleneck on the USB interface. The strange thing is that I sometimes get good performance and other times bad performance.
For example, I have a memory stick which should go about 5MB/s for write.
From this stick, I sometimes get the promised 5MB/s. But sometimes I get only about 120kb/s. It is the same stick, plugged into the same port, without reboots. But for some strange reason, sometimes it is recognized as a "full speed device" (this is the slow mode) and sometimes as a "high speed device" (this is the fast mode). Please check the two excerpts from /var/log/messages below.
This is opensuse-11.2 running on a 2GHz Athlon dual core 4850e with USB2.0 on-board.
Any ideas?
Jan 13 17:15:42 raven kernel: [4988831.356060] usb 6-3: new full speed USB device using ohci_hcd and address 10 Jan 13 17:15:42 raven kernel: [4988831.496420] usb 6-3: not running at top speed; connect to a high speed hub
Jan 14 18:47:12 raven kernel: [5080721.042097] usb 2-6: new high speed USB device using ehci_hcd and address 8 Jan 14 18:47:12 raven kernel: [5080721.158891] usb 2-6: New USB device found, idVendor=1307, idProduct=0165
You say they are being plugged into the EXACT SAME PORT but your examples from two consecutive days suggests they were actually in different ports. Its not unusual for machines to have ports in the same machine that use different controllers even when they sit close to each other.
Thanks for your suggestion, John! Looks like we're getting closer, but there's still something missing. I am pretty much sure this is the same port. This machine has only two ports on its front panel and in one of them (the left one) _always_ sticks a white cable (not transparent, you don't see such white USB cables often!) to charge my cell phone. If I ever need to plug anything to this box, I _always_ use the port on the right side. Never ever unplugged this white cable. I have no idea whether the motherboard does some re-routing (ever heard of such things? Would this make any sense?) or something. But I am pretty much sure it is the same port _physically_. Just to be sure, I unplugged this white cable and plugged the mem-stick into the white-cable-port. Gives me the high-speed device again, just what I had before I unplugged the stick. Therefore it's clear: it doesn't make any difference whether I use the left port or the right port.
However, if you are very sure it is on the same port, is it possible that something else plugged in to another port on the same header would pull both ports down to USB 1.1 speed.
Yeah! As I mentioned above, I use this white cable to charge my cell phone. This might be an explanation. So I tried to connect the mem-stick while the phone was plugged. But I got the high-speed again, so there's still no explanation what causes this low-speed connects. Maybe the phone must be in some wired state to cause such a downgrade? Apart from the cell phone, I'm pretty much sure that nothing else was connected to those two ports in the last two weeks. Thus I'd rule out any other device to be the cause of the speed downgrade.
Early USB 2.0 implementations did not not have good transaction translators on each port. Any slow speed device on the same controller could bring the whole bus down to 12mg.
You're kidding, right? I'm not talking about 12mb. I'm talking about 120kb. That's a factor of 100 (yeah, _two_ zeroes). With a factor of 100, you don't even need to rethink whether you confused bits versus bytes or something. The problem is, that _nobody_ is going to wait five hours(!) before unplugging the damn stick. Therefore, you can _bet_ that data (_and_ meta-data) has not arrived on the stick. This results in a broken filesystem. Next time you try to access the data, you'll get I/O-errors. I've seen this a lot in the past and I always thought the mem-stick is to blame. Looks like I was wrong. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, Jan 15, 2011 at 02:03:14AM +0100, Josef Wolf wrote:
On Fri, Jan 14, 2011 at 02:51:40PM -0800, John Andersen wrote:
On 1/14/2011 10:06 AM, Josef Wolf wrote:
I am trying to track a performance bottleneck on the USB interface. The strange thing is that I sometimes get good performance and other times bad performance.
For example, I have a memory stick which should go about 5MB/s for write.
From this stick, I sometimes get the promised 5MB/s. But sometimes I get only about 120kb/s. It is the same stick, plugged into the same port, without reboots. But for some strange reason, sometimes it is recognized as a "full speed device" (this is the slow mode) and sometimes as a "high speed device" (this is the fast mode). Please check the two excerpts from /var/log/messages below.
This is opensuse-11.2 running on a 2GHz Athlon dual core 4850e with USB2.0 on-board.
Any ideas?
Jan 13 17:15:42 raven kernel: [4988831.356060] usb 6-3: new full speed USB device using ohci_hcd and address 10 Jan 13 17:15:42 raven kernel: [4988831.496420] usb 6-3: not running at top speed; connect to a high speed hub
Jan 14 18:47:12 raven kernel: [5080721.042097] usb 2-6: new high speed USB device using ehci_hcd and address 8 Jan 14 18:47:12 raven kernel: [5080721.158891] usb 2-6: New USB device found, idVendor=1307, idProduct=0165
You say they are being plugged into the EXACT SAME PORT but your examples from two consecutive days suggests they were actually in different ports. Its not unusual for machines to have ports in the same machine that use different controllers even when they sit close to each other.
Thanks for your suggestion, John!
Looks like we're getting closer, but there's still something missing.
I am pretty much sure this is the same port. This machine has only two ports on its front panel and in one of them (the left one) _always_ sticks a white cable (not transparent, you don't see such white USB cables often!) to charge my cell phone. If I ever need to plug anything to this box, I _always_ use the port on the right side. Never ever unplugged this white cable.
I have no idea whether the motherboard does some re-routing (ever heard of such things? Would this make any sense?) or something. But I am pretty much sure it is the same port _physically_.
Just to be sure, I unplugged this white cable and plugged the mem-stick into the white-cable-port. Gives me the high-speed device again, just what I had before I unplugged the stick. Therefore it's clear: it doesn't make any difference whether I use the left port or the right port.
However, if you are very sure it is on the same port, is it possible that something else plugged in to another port on the same header would pull both ports down to USB 1.1 speed.
Yeah! As I mentioned above, I use this white cable to charge my cell phone. This might be an explanation. So I tried to connect the mem-stick while the phone was plugged. But I got the high-speed again, so there's still no explanation what causes this low-speed connects. Maybe the phone must be in some wired state to cause such a downgrade?
Apart from the cell phone, I'm pretty much sure that nothing else was connected to those two ports in the last two weeks. Thus I'd rule out any other device to be the cause of the speed downgrade.
Early USB 2.0 implementations did not not have good transaction translators on each port. Any slow speed device on the same controller could bring the whole bus down to 12mg.
You're kidding, right? I'm not talking about 12mb. I'm talking about 120kb. That's a factor of 100 (yeah, _two_ zeroes). With a factor of 100, you don't even need to rethink whether you confused bits versus bytes or something.
The problem is, that _nobody_ is going to wait five hours(!) before unplugging the damn stick. Therefore, you can _bet_ that data (_and_ meta-data) has not arrived on the stick. This results in a broken filesystem. Next time you try to access the data, you'll get I/O-errors. I've seen this a lot in the past and I always thought the mem-stick is to blame. Looks like I was wrong.
Any suggestions how to track this down? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2011-01-14 at 19:06 +0100, Josef Wolf wrote:
Hello folks.
I am trying to track a performance bottleneck on the USB interface. The strange thing is that I sometimes get good performance and other times bad performance.
For example, I have a memory stick which should go about 5MB/s for write.
From this stick, I sometimes get the promised 5MB/s. But sometimes I get only about 120kb/s. It is the same stick, plugged into the same port, without reboots. But for some strange reason, sometimes it is recognized as a "full speed device" (this is the slow mode) and sometimes as a "high speed device" (this is the fast mode). Please check the two excerpts from /var/log/messages below.
This is opensuse-11.2 running on a 2GHz Athlon dual core 4850e with USB2.0 on-board.
Any ideas?
Jan 13 17:15:42 raven kernel: [4988831.356060] usb 6-3: new full speed USB device using ohci_hcd and address 10 Jan 13 17:15:42 raven kernel: [4988831.496420] usb 6-3: not running at top speed; connect to a high speed hub Jan 13 17:15:42 raven kernel: [4988831.508147] usb 6-3: New USB device found, idVendor=1307, idProduct=0165 Jan 13 17:15:42 raven kernel: [4988831.508191] usb 6-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jan 13 17:15:42 raven kernel: [4988831.508208] usb 6-3: Product: USB Mass Storage Device Jan 13 17:15:42 raven kernel: [4988831.508226] usb 6-3: Manufacturer: USBest Technology Jan 13 17:15:42 raven kernel: [4988831.508243] usb 6-3: SerialNumber: 00000000000025 Jan 13 17:15:42 raven kernel: [4988831.508513] usb 6-3: configuration #1 chosen from 1 choice Jan 13 17:15:42 raven kernel: [4988831.510720] scsi16 : SCSI emulation for USB Mass Storage devices Jan 13 17:15:42 raven kernel: [4988831.511044] usb-storage: device found at 10 Jan 13 17:15:42 raven kernel: [4988831.511051] usb-storage: waiting for device to settle before scanning Jan 13 17:15:43 raven kernel: [4988832.519175] scsi 16:0:0:0: Direct-Access Ut165 USB2FlashStorage 0.00 PQ: 0 ANSI: 2 Jan 13 17:15:43 raven kernel: [4988832.532181] usb-storage: device scan complete Jan 14 07:26:51 raven kernel: [5039900.748961] usb 6-3: USB disconnect, address 10
Jan 14 18:47:12 raven kernel: [5080721.042097] usb 2-6: new high speed USB device using ehci_hcd and address 8 Jan 14 18:47:12 raven kernel: [5080721.158891] usb 2-6: New USB device found, idVendor=1307, idProduct=0165 Jan 14 18:47:12 raven kernel: [5080721.158936] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jan 14 18:47:12 raven kernel: [5080721.158953] usb 2-6: Product: USB Mass Storage Device Jan 14 18:47:12 raven kernel: [5080721.158971] usb 2-6: Manufacturer: USBest Technology Jan 14 18:47:12 raven kernel: [5080721.158988] usb 2-6: SerialNumber: 00000000000025 Jan 14 18:47:12 raven kernel: [5080721.159415] usb 2-6: configuration #1 chosen from 1 choice Jan 14 18:47:12 raven kernel: [5080721.170350] scsi17 : SCSI emulation for USB Mass Storage devices Jan 14 18:47:12 raven kernel: [5080721.170657] usb-storage: device found at 8 Jan 14 18:47:12 raven kernel: [5080721.170664] usb-storage: waiting for device to settle before scanning Jan 14 18:47:13 raven kernel: [5080722.171201] scsi 17:0:0:0: Direct-Access Ut165 USB2FlashStorage 0.00 PQ: 0 ANSI: 2 Jan 14 18:47:13 raven kernel: [5080722.172581] usb-storage: device scan complete
Silly question: are you plugging it in to the exact same USB connector each time? One says 'ohci_hdc' and the other says 'ehci_hdc'. So different drivers are used. That would only happen if there was different USB hardware involved. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 SHAW'S PRINCIPAL Build a system that even a fool can use, and only a fool will want to use it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 14/01/11 20:04, Roger Oberholtzer escribió:
Silly question: are you plugging it in to the exact same USB connector each time? One says 'ohci_hdc' and the other says 'ehci_hdc'. So different drivers are used. That would only happen if there was different USB hardware involved.
Not silly at all ;) one appears to be an USB 1.1 controller and the other an USB 2.0 ... -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0wzKkACgkQhbiInYWJi9N8wACfVWWPPo6551CE+uVYGmp906Yt 4AcAnjAozsiFVGNRCJkdiseOlf6ZyvJ8 =Rpc3 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jan 14, 2011 at 07:22:33PM -0300, Cristian Rodríguez wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
El 14/01/11 20:04, Roger Oberholtzer escribió:
Silly question: are you plugging it in to the exact same USB connector each time? One says 'ohci_hdc' and the other says 'ehci_hdc'. So different drivers are used. That would only happen if there was different USB hardware involved.
Not silly at all ;) one appears to be an USB 1.1 controller and the other an USB 2.0 ...
I bet you have an explanation how different controllers come to appear on the same physical port without hardware change and without reboot? So, why don't you share your knowledge with me? Thanks, -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, Jan 15, 2011 at 12:04:41AM +0100, Roger Oberholtzer wrote:
On Fri, 2011-01-14 at 19:06 +0100, Josef Wolf wrote: [ ... ] Silly question: are you plugging it in to the exact same USB connector each time? One says 'ohci_hdc' and the other says 'ehci_hdc'. So different drivers are used. That would only happen if there was different USB hardware involved.
As I already wrote in this thread, I am 100% confident that this is the same connector _physically_. I have no idea whether the motherboard does some re-routing or whatever, though. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Cristian Rodríguez
-
John Andersen
-
Josef Wolf
-
Roger Oberholtzer