[K12OSN] Quick Question about Swap partitions

Les Mikesell les at futuresource.com
Fri Aug 3 17:42:36 UTC 2007


Jim Kronebusch wrote:
>> It depends on the use pattern, but on machines I've seen as you get 
>> close to 2 gigs into swap the machine will be so slow and unresponsive 
>> that you'll probably reboot it before it would recover - if it ever 
>> does.  The main point is that you need enough RAM. Swap will keep the 
>> machine from crashing if you run short momentarily but its not a real 
>> substitute.
> 
> So then theoretically is there a problem with having too much swap available?  I want to
> be sure I have enough in a just in case scenario, but if too much will also slow things
> down I want to keep it to a minimum.  

No, it just won't be used unless you need it.

> For example let's say you have a system with 16GB RAM and a 2GB swap, would this perform
> any differently than a machine with 16GB RAM and 10GB swap?  If both perform the same,
> and you have enough space, wouldn't the setup with more swap be safer if a sudden high
> use case came about? 

Yes if the high use case comes at night when nobody cares...  When users 
  are active they aren't going to like it when they have to wait for 
several gigs of disk reads and writes between their keystrokes.

> Obviously if events kept repeatedly using all the RAM and digging
> deep into swap usage, you would add more RAM for the future and hope to stay out of swap
> completely.

There's the famous quote from supercomputer designer Seymour Cray in the 
late 70's:
"Memory is like an orgasm. It's a lot better if you don't have to fake it"
I don't think it has changed much since.

-- 
   Les Mikesell
    les at futuresource.com





More information about the K12OSN mailing list