On 05/18/2012 08:00 AM, JR van Rensburg wrote:
> On Fri, 2012-05-18 at 00:33 +0200, Charles ELSAESSER WebmailOrange
> wrote:
>> Due probably to USB local-network addresses order,
>> or perhaps to some other insufficiant USB media management,
>> if your target install media is an USB key, it is farmore better to
>> locate the swap partition on the same physical media.
>
> Just beware - usb keys were not designed to take multiple read writes
> and will eventually fail. So it is not best practice to have a swap on
> the key
> Better to have more RAM.
Also, actually using swap, like in the event you have significantly
large blobs of data that need to get cached in swap, is *really* slow
from USB flash drives. On a system with less RAM than is optimal perhaps
this is unavoidable, but USB flash drive reads are way below the speed
of a normal SATA disk (low latency but very slow throughput from USB
flash VS high latency but huge throughput from HDD); if you thought
thrashing was bad on a spinning disk, you can experience a new world of
pain with large page sizes with swap a USB flash drive.
That said, on a system with >= 1Gb RAM swap usually isn't necessary (not
saying you should do video or raw image processing on a system with just
1Gb RAM, though) and if you tune your USB tiny system the way you would
do, say, an advanced SSD setup (/tmp, browser cache and a few other
things in tmpfs, no swap, etc.) you could probably squeeze some decent
performance out of your setup (other than program data load time/program
startup, of course).
Anyway, JRvR's warning about flash writes is very true. If you hit your
flash drive hundreds of times with tiny read/write cycles you'll soon
have a guitar pick in your hand instead of a flash drive.
|