Where USB flash drives fail is in random writes to the disk. They can be hundreds of times slower than the same operation on traditional hard drives. Note that this used to be the case with SSDs too until about 3 or 4 years ago when they gained new controller technologies which make them much faster than tradtional hard drives. These technologies pretty much don't exist on USB flash drives).
Operations that will be particularly slow include:
- Installing new packages, or doing system updates. Expect these to be tens of times slower than traditional hard drives, maybe even 100s of times slower than new SSDs. Upgrading between Ubuntu versions could take several hours or more.
- General browser use, given that your browser caches files to disk all the time.
- Operations which involve copying or moving/altering hundreds of small files.
This article on phoronix compares the performance of various file systems on USB flash drives. Unfortunately, its conclusion is that it doesn't make all that much difference. Theoretically, a log-structured file system should help, but these aren't mainstream enough for me to recommend them for the uninitiated.
One idea is to use a read-only or hybrid file-system instead, which is exactly what you get if you copy the Ubuntu Live CD image (or use UNetBootin to set up a live USB) to your USB flash drive. Look into setting up a Live USB from the Live CD image with persistence (try to find a recent guide to doing so). Of course, you then won't be able to upgrade to a new version of Ubuntu, but that's not necessarily terrible.
Barring any such measures, and keeping a traditional partition type/structure, your main strategy will be to try and minimise writes to the disk at all cost. Ideas for this include:
- Disable journalling on ext4 or set your partitions to "writeback" mode. The drawback to this is that it increases the chances and severity of data loss or corruption in the case of accidental power loss, crash or simply unplugging the drive while it's being used.
- Mount with "noatime" mode so that there aren't writes to the disk when reading a file.
- Disable swap, though on a system with sufficient RAM this actually will have much less of an effect than you expect, and on a system with insufficient RAM will cause stability problems.
- Try to minimise on-disk caching by various programs, such as your browser. Reducing the size of the disk cache is not necessarily enough: turning it off all together and using a memory cache (if possible) is much better. If you're adventurous and have lots of RAM, you could try using a tmpfs mount (like a disk partition in RAM) for things like this.