1) What specifically internally makes my "liveCD with persistence" install on my USB stick run faster than my full install on my USB stick?
2) What would I have to change in my full install system to make it a "liveCD with persistence" system?
|show 3 more comments|
When you run linux off a usb dirve, your overall overall speed is often limited not by your cpu, but by your disks I/O. How quickly the data can transfer on and off your USB. Becos the data transfer rate over a USB 2.0 is limited, you see. So, in that context, a liveCD version has several advantages over a full install on a USB.
Firstly, a liveCD stores its data in compressed loop files, typically using squashfs. And becos the data is compressed, it can be transferred off the USB more quickly. Whereas with a full install, the data is uncompressed.
Secondly, benchmarks for data transfer off a USB show that large files transfer much faster than a lot of small files. With the LiveCD format, the data is stored in one or more large cloop files, which is ideal. But with the full install version, there are many smaller files. And that can result in a slower data transfer rate.
Thirdly, a liveCD linux uses a union filesystem like AUFS. It is a virtual file system, sometimes known as a stackable filesystem. It is designed such that write cycles to the USB are minimized, certainly much less that for the full install version on a USB. This helps becos a) data writes to a USB take x2 longer than reads, and b) excessive writing to your usb will wear it out sooner.
As Roland said, the speed improvement you got is likely to be the difference between a disk (relatively high latency, seek times etc) and solid state memory.
Installing a LiveCD version on your internal drive will work, but should not be thought of as a speed improvement. It may be slightly slower, as there are some workarounds involved with using a read-only filesystem.
Actually, some bits may work faster as they will be running from a ramdisk.
Subsequent to your updates, your question makes more sense now. It looks like what you mean is you want to take the existing install you have on your hard drive and convert it to a LiveCD for your USB stick. If that is the case, go to this Ubuntuforums post which describes the process. The differences are (from the Ubuntuforums post):