[comp.unix.aux] How big should the swap partition be?

herbw@midas.WR.TEK.COM (Herb Weiner) (11/06/90)

A/UX has eaten up all my disk and memory, so it's time to upgrade...

The question is, how do I calculate the required size for the swap
partition?  Is this a function of the amount of physical memory
installed?  Is it a function of the maximum amount of virtual memory
that all processes together will be using?  If it's too small, does
the system slow down, or die?  If I increase it, will my system
response improve?  etc.  (I will be upgrading to 20 MB of RAM.)

If this is covered in the manual(s) somewhere, I apologize; I looked,
but could not find any discussion of this topic.

Herb Weiner (herbw@midas.wr.tek.com)

sramtrc@windy.dsir.govt.nz (11/07/90)

> 
> 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.