Ubuntu – Performance cost of running Ubuntu from external hard drive

external-hddperformance

A friend just complained to me about Ubuntu being slow.

Although I've noticed a certain lack of snappiness with Linux vs Windows in the past, I really can't say I've had much to grumble about with the recent distributions of Ubuntu. That said, his objections seem much worse than the ones I used to have and I know that his current setup is significantly more powerful than my laptop.

And then it turned out he is running Ubuntu off an external HDD hooked up via USB2.0. The HD enclosure is USB3.0 but apparently he can't manage to get it to boot on USB3.0 so he switched to one of the USB2.0 ports or whatever and that works, albeit not very well.

Now I would expect USB to add some overhead to communication between the computer and the HDD; SATA is after all designed to get the maximum out of a hard drive, whereas USB is, well, universal.

What are your expreriences with booting off external HDDs?

Edit: Does anybody know just how much of a slowdown can be expected?

Best Answer

USB 2 is rubbish. There. I said it.

It is fairly universal and it's allowed us to get a lot of extra hardware attached to our computers but for transfer speed, it's just no good. Around 20-30MB/s would be typical in my experience.

Might not sound terrible but an average internal drive manages 70-100MB/s and a great SATA drive can touch 300MB/s. There are of course even better products but they're prohibitively expensive.

  • USB 3 is far better but although we've had drivers in Linux longer than any other platform, they're still pretty buggy in my experience. You might ask him to try upgrading the kernel to 2.6.37 and then trying USB3. The last two kernels since Maverick's 2.6.35 has had a few USB3 changes. This similarly might not fix anything - Grub could equally be the issue.

  • eSATA would be the ideal for an external drive. I don't know what your friend's computer has in the way of ports (or what his external disk provides), but eSATA will wipe the floor with USB 2 (probably even USB3 in real-world tests). If he has it, use it. If he has a spare PCI-E slot, perhaps a little eSATA card might be a better bet (they're quite cheap).

    Seek time will probably be the biggest improvement over Firewire (and USB3). It doesn't matter too much for storing big media but when you're buzzing between lots of small files (like the Linux boot), it makes a huge difference.

  • Firewire might be an option if he has that option on the drive and computer... Firewire is often criticised for being slower than USB but spec for spec, it's actually a lot faster in practice for data transfer. Seek speeds are similar.

  • If he has a fast network adapter and some spare cash, a network-attached-storage device might be a nice option. You can get two-drive units quite cheap that can share their files over NFS. If you have gigabit connections at each end this can translate to a fairly steady 100+MB/s

  • Finally, if nothing else seems like an option... Ask him why he's being such a jessy and get him to repartition. You can resize the Windows partition non-destructively (ie it stays there all warm and happy, just a bit smaller).

    Just set aside ~10gigs for the core Ubuntu install and a base profile and then just symlink big media in from the external drive. Boot time and responsiveness will improve huge amounts.

Related Question