[ILUG] Thoughts on USB as swap space

Pádraig Brady P at draigBrady.com
Wed Jan 2 10:15:08 GMT 2008


Niall O Broin wrote:
> How much swap is needed is an easy calculation:
> 
> swap space = required memory space - physical memory
> 
> 
> The tricky part is figuring out the value of "required memory space" :-)
> 
> on a machine with 4GB of RAM, for desktop use, you probably hardly need
> any swap, but I'd give it 1GB just to have some.

Libraries etc, tend to be loaded into RAM but mostly not used.
Hence it's nice to have some swap so that this RAM can be made available
if the system comes under memory pressure.
So yes, 1GB seems like a sensible amount for this.

>> Should it go on a partition with the main os files usually hda(0-9), 
>> or separate physical drive hdb,c (0-9) etc.
> 
> If you were really using swap, you'd want it on a separate disk, as fast
> as possible, and on  a particular part of the disk to maximise access
> speed. Real world, for your usage, it's hardly going to matter.

In my experience disks are so slow compared to other components these days,
that if you're actively using swap then the machine is hosed anyway.
So from that point of view, an SSD would be better as it has negligible seek time.
However the general solution is just buy more RAM,
especially given the cost these days.

BTW it's really great that SSDs are beginning to replace those rattly things in our systems.
Hard disks are going to become obsolete very quickly given their relative disavdantages.

Pádraig.



More information about the ILUG mailing list