I've got a Linux system with two USB 2.0 ports and one USB 3.0 port, and I would like to know how many USB hard drives I could plug into it.

On the performance side, what would the I/O access be like as I add more and more drives? I expect I will have to have multiple levels of fan-out by plugging hubs into hubs to maximize the number of devices on each USB port. Would a tool like iostat tell me if all the disks share roughly the same bandwidth?

  • 2
    I wouldn't try maximizing the number of devices on the bus by plugging hubs into hubs. Instead, I would simply find a very large single hub for each USB host port. You are already trying to cram a fabrosaurus through a funnel by plugging so many devices into a single port. Don't compound it by making multiple drives compete for single hub ports, too. This appears to be a good solution for USB 2.0, for example. Adding a PCI card with more USB host ports would be a better solution than increasing the fan-out depth. – Warren Young Jul 12 '11 at 10:05

Well you can connect up to 127 devices (including hubs) to each USB controller so the answer will partly depend on whether those two USB 2.0 ports are on the same controller or on different controllers.

Overall the answer is probably several hundred anyway, not that I would recommend that as you'll be sharing the limited amount of I/O that is available among them all, as you seem to have realised.

Assuming USB 2.0 devices you have a theoretical maximum of 480Mbit/s available on each bus which, shared among say 100 disks, would give you 4.8Mbit/s for each at best. Of course that assumes you are trying to access them all at once, which you may well not be.

  • 1
    I have never seen anywhere near 480 Mbit/s to a USB disk, no matter how fast the disk, even if it is alone on the bus. The fastest I recall seeing was about a third that. And the raw drive itself was plenty fast enough to exceed that. While it is possible multiple drives in parallel could achieve some efficiencies not possible with a single device, I doubt this will help, due to USB's requirement for host mediation. I think the 2:1 overhead I've seen is largely due to the USB device waiting on the host CPU to process data and commands. – Warren Young Jul 12 '11 at 9:41
  • thanks very much, upvoted. I've added a comment asking for tools to assess the performance as well. – 719016 Jul 12 '11 at 10:03
  • 1
    @avilella: You really should be asking three separate questions here, not trying to make one answer cover all three. The correctness of one piece doesn't affect that of any of the others. – Warren Young Jul 12 '11 at 10:08
  • Thanks. Now how about editing your question to only talk about # of USB devices, then accept TomH's answer, which is correct? :) – Warren Young Jul 12 '11 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.