Actually there is exactly one rule with swap:
The total of RAM + swap must be larger than the total amount of memory
required by the applications, which you want to run at the same time.
That said, there are two recommendations:
- If your swap is more than twice the size of your RAM, you might consider
to upgrade your RAM, because the increasing frequency of swapping will
degrade your overall system performance. Please note, this is only a rule of
thumb and depends on your needs and applications.
- Even with tons of RAM it's a good idea to have at least 4-8 MB of swap.
This will allow to swap unused or very seldom used process to disk (like
gettys for VTs, etc), thus allowing to use the RAM for more useful purposes,
e.g. disk caching.
Jrgen Exner; jurgenex AT microsoft.com
Sorry for this anti-spam inconvenience
>I remember that problem too, and I quote the RedHat 4.2 User's guide:
>"If your computer has 16 MB of memory or less, you must create a swap
>partition; even if you have more memory, a swap partition is
>recomended. The size of your swap partition should be at least 16 MB
>or the same as the amount of memory in your computer, whichever is
>It sure seems like one ought to have a swap partition the size of
>one's RAM, but I don't think that's necessary... Why should you need a
>larger swap part. when you have more RAM. The swap part. is a
>complement to the RAM, isn't it, like if some process needs more
>memory it can use swap space on the HDD... I also have 64 MB RAM, but
>still my swap part. is only 16 MB... So I would advice you to use only
>16 MB of disk space for a swap part., especially since you don't have
>infinite disk space...
>>The manual that comes with Redhat 5.0 says that the swap
>>partition should be = amount of physical ram or 16M (which ever
>>is larger). Is this an absolute requirement? I ask because
>>I have 64Meg of ram but only partitions of 1) 353Meg and 2) 23Meg
>>for system and swap, and I don't want to repartition although
>>I could do that if needed. The partition 3) already has
>>an established OS that I don't want to disturb (OS/2 4.0)
>>I seem to remember swap=ram is a rule of thumb that can be
>>broken if you have a lightly used machine, lots of ram or
>>a combo of this situation.
>| Mikael Bengtsson |
>| www.nada.kth.se/~d97-mbe |
>"Life's like a box of chocolates...
> you never know what you're gonna' get."
> -Forrest Gump