What swap memory is best?

manny2008

Verified User
Joined
Feb 9, 2004
Messages
74
I am installing DA on a server with 1GB of ram but plan to upgrade the memory to 2GB in the near future, should i install with swap 2 x the current memory or 2 x the future memory? Or doesn't matter!
 
It depends on how easy it is to increase the size of your swap on your Operating System. It may be easier to set it for the larger amount since that space will have to be used for swap later on anyways.
 
Believe it or not, it doesn't matter.

The "twice the memory" mantra became popular way back when we built Unix and Linux servers with only a few hundred meg of memory.

Swap of one gig should never cause a bottleneck on a webhosting server.

Another old mantra you may of heard of is "at least as large as memory because if the kernel panics it dumps the memory to swap you so you study it to see the reason for the panic."

Some old Unix kernels did this. According to Robert Love (he's a kernel maintainer who works for Ximian/Novell), in a response to a specific question I wrote some time ago to the University of Florida linux list, responded that Linux has never done this.

Jeff
 
I agree with jlasman on this that things are not as they used to be. I usualy make a 1GB swap partition wether the server a 1GB or 2GB of RAM. I have never had a problem with swap filing up.

If you have 1GB of RAM and a 1GB of swap and you fill them both up then you should have know you were headed for problems long before it happened and added some RAM.

Even if it did still dump all the memory to disk how many admins are going to look through a dump that size? Unix admins used to be programmers also for the most part but that is not the case anymore.
 
Not to mention that by the time you've filled up 1GB of swap your machine is running so slowly as to be nonresponsive anyway.

Jeff
 
Back
Top