How big should the swap partition be?

sramtrc at windy.dsir.govt.nz sramtrc at windy.dsir.govt.nz
Wed Nov 7 22:40:44 AEST 1990


> 
> The question is, how do I calculate the required size for the swap
> partition? 

Do /etc/swap -l. This will tell you how much swap space you are using. Do
it often and you will get an idea of your usage.

The formula goes something like (for a paging system) 
total memory available = RAM + SWAP
where total memory available is the amount of memory you have to run
processes in. You want to have
total memory available >= total memory needed
where total memory needed is the amount of memory you need to do whatever
you want to do. This is just about impossible to calculate since memory
requirements of any program vary all the time. As a general rule programs
need more memory to start up than to run. So usually they require less
then the sum of their text+data requirements. Really, the best way is to
run a lot of stuff and play with /etc/swap.



More information about the Comp.unix.aux mailing list