24

Running Fedora 26 in a live environment almost feels like native speed to me, but when I install the OS to a thumb drive and boot into it, everything takes forever to startup. Once things start they're generally much faster but it's practically unusable.

Is this considered normal?

  • 4
    I dunno. A live OS installation may try to do as much as possible on memory-mounted file systems, whereas a normal installation would try to use the slower disk? Sounds reasonable to me. – Kusalananda Sep 22 '17 at 16:18
  • 2
    Not an answer to the question, but the problem goes away with USB3 drives as long as you have a new enough OS that it accesses USB3 efficiently. I have USB3 thumb drives that are just as fast as internal eMMC (not much worse than low-end SATA SSDs). – R.. Sep 23 '17 at 0:26
  • Can confirm the problem goes away with faster USB drives. I ordered a new name brand USB 3.0 thumb drive and things feel almost native now. I believe I'm still using USB 2.0 ports though, so I imagine if I was using 3.0 ports it would feel at least as fast as my HDD connected through SATA. – hermancain Sep 23 '17 at 12:36
37

It has to do with how they operate.

For a regular installation to a flash drive, you're limited by USB bandwidth, so unless you have a good USB 3.0 device, you're stuck at about 20MB/s (which is equivalent to traditional hard drives from around the late 90's). All changes get written to the device too, so you are sharing that USB bandwidth for reads and writes.

A Live system however operates somewhat differently. At its core, a Live system consists of a base system image (usually a SquashFS image, as it's good for space efficiency) and a overlay mount on top of that to intercept changes and keep them in RAM. There are two specific ways this is handled:

  1. The base system image is loaded into RAM at startup, and everything runs from there afterwards.
  2. The base system image is kept on the flash drive, but certain parts of it get pre-loaded into the cache.

In the first case, you can actually run faster than native speed (because you never access anything slower than RAM), but your startup takes a long time (because you're copying hundreds of MB of data into RAM. In the second case, you're not going to be quite as fast as native speed, but because you never write anything to the falsh drive, you also almost never drop data from the cache, and therefore are running reasonably fast too.

  • 3
    Assuming that your (free, available for caching) RAM is larger than the OS image (which is a pretty reasonable assumption), the second option will essentially end up being a lazy-loaded version of the first. – Jörg W Mittag Sep 22 '17 at 23:06
  • Actually with a good enough USB 2.0 drive you can get up to 30 MB/s (half the theoretical USB 2.0 bandwidth). I do have one such drive. – Ruslan Sep 23 '17 at 15:08
  • @JörgWMittag Pretty much, but I have not seen many Live images configured like that, probably because the first option will usually be more efficient if you have a particularly slow device. – Austin Hemmelgarn Sep 25 '17 at 13:11
  • @Ruslan Good point, though from what I've seen though such drives are reasonably rare (especially with USB 3.0 becoming the norm, there's not much incentive to make high-end USB 2.0 drives). – Austin Hemmelgarn Sep 25 '17 at 13:13

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.