Linux Swap???

Warren Togami warren at togami.com
Fri Sep 7 00:30:28 PDT 2001


(Repost)

Yeah, everyone gives this same reason in opposition, and yet Linus and Alan
Cox still insist on 2x RAM for swap.  What I do understand is that kernel
2.4 uses swap in a completely different way than earlier kernels, in that it
does not de-allocate old pages unless necessary.  This makes means greater
performance with less unnecessary work with the swap area, but it also means
less efficient swap usage.

I think it doesn't matter much for single user systems, because you probably
wont overload it and load doesn't remain consistently high.  But I think the
bad effects occur on large and constantly loaded servers.  Two of my servers
have 2GB each, and I was surprised when I tried to make a 4GB swap
partition.  It wont let me.  Swap maximum size is 2GB, so I ended up
creating two 2GB partitions.

Another tip:
If you have two hard drives, don't RAID stripe swap partitions.  Instead
setup multiple swap areas on multiple disks, and set the priority equal on
both.  The kernel itself will make more efficient use of the I/O on all
available drives than RAID striping.

----- Original Message -----
From: "Dusty" <dusty at sandust.com>
To: "Linux & Unix Advocates & Users" <luau at list.luau.hi.net>
Sent: Thursday, September 06, 2001 6:50 PM
Subject: [luau] Linux Swap???


> I'll have to do some reading about that.  That is something new to me.
Sun used to tell us don't make swap more than 2x physical memory.  Something
about a performance problem trying to address more memory that it had.
Where did you read that they recomend 2x ram for swap?
>



More information about the LUAU mailing list