1

I'm using Ubuntu 16.04 on a USB drive with persistent flag.

(Yes, I need this as I need to move around with it and use on various computers.)

Most recently I've used this on a Dual Xeon server box with 64Gb of RAM, so I can rule out CPU or RAM as an issue, and it is very very slow:

For example, clicking on Chrome to open the browser may take 30-60sec, once Chrome is open, loading a page in a tab that was previously open takes another 30-60sec. Often times I get the 'window is unresponsive' shadowed window warning.

Command line / Terminal commands is fairly responsive, but it seems that as soon as some sort of GUI or display terminal needs to open, it takes forever, which makes me wonder if it is related to graphics hardware.

The USB drive is 32GB, admittedly Ubuntu is only on a 4GB partition which was the max I could allocate, but there is still quite some room.

I understand USB 2.0 is slower than SATA2 by ~10x, but here I feel like this is way more than a 10x slow down, plus that could account for loading time, but once loaded there should not but such issues.

I also realize this is a broad question, but where do I start to troubleshoot this sluggishness?

Could someone recommend steps to check different parts of the system that could cause this type of issues?

Thanks

EDIT: I mostly use command line on this OS (to compile and test stuff), but I often need to refer to doc online, which is why I opted for the Desktop version and need Chrome)

MrE
  • 111
  • Boot to a Ubuntu 16.04.1 Live DVD and compare the speed. It'll still be slower than a SATA hard disk, but it's a comparison point for you. Cheers, Al – heynnema Sep 01 '16 at 18:00

2 Answers2

1

I had the same problem with Ubuntu 19.10, all the solutions I tried were a failure. I had to switch to Lighdm from gdm3. Now it is working great.

1

A server class hard drive can probably reach throughput as high as 100MB/s, where as a low end USB2 thumb drive might reach only 5 MB/s. So the difference in performance could be more like 20x, not the 10x you're assuming. (See this Tom's Hardware review to compare throughput numbers yourself.) Keep in mind that neither drive saturates its interface, so comparing SATA's 3Gb/s to USB's 480Mb/s isn't practical…

If you want to compare practical throughput, try some of the advice in this Q&A: How to monitor disk activity?

Having tried to run an OS off a USB2 thumb drive myself, I can tell you that it's going to be painfully slow. If you have a USB3 interface, you can get much, much better throughput if you pick the right thumb drive: some drives can exceed 100Mb/s. The Tom's Hardware link above includes a good comparison of USB3 vs USB2.

One of the non-obvious factors in thumb drive speed is that drives with more NAND chips are (all other things being equal) faster than drives with fewer NAND chips. So a 64GB drive is faster than 32GB, 128GB is faster than 64GB, etc.

One last thought: if swap is enabled on your thumb drive OS, try disabling it. Swap is used even when you have lots of physical memory (e.g. this Q&A) and if you are have tight I/O constraints, then it might be a good tradeoff to disable swap.

  • thanks for the thoughts... i think my problem was more a problem of corrupted file system. I rebuilt the image on the USB drive and it behaves fine. – MrE Sep 28 '16 at 17:41