out of swap space??

Jack F. Vogel jackv at turnkey.tcc.com
Fri May 3 02:21:41 AEST 1991


In article <455 at jgaltstl.UUCP> terry at jgaltstl.UUCP (terry linhardt) writes:

>I've often wondered where the recommendation that 2 - 3x real memory should
>be made available to swap comes from? Wouldn't this depend upon
>whether or not the system is swapping at all? For instance, let's
>say you have 48 meg of memory, and no swapping. Does this mean
>I should tie up 100 - 150 meg of disk space for swap? Also, isn't
>there less need for swap space with paging systems?
 
I think people are often unaware, due to its name, "swap" device that this
space serves a dual role. It is not only a place to store "swapped" processes
it is also where the pager (vhand) writes pages that it steals. When demand
on real memory reaches a certain low water mark, the pager examines all user
processes and "steals" pages that haven't been referenced for a while. This
means it writes that page to the swap device and then returns the underlying
page frame to the free pool. When the system is properly configured, the
pager should do all the work, swapping shouldn't occur, the swapper (sched)
should only be invoked because the pager simply can't keep enough memory
free by stealing.

So, a more technical algorithm for determining required swap space might be
'the total virtual memory demand on the system' or 'the sum of the resident
sets of all processes running on the system'. This value should be equal
to your main memory + swap space. How do you determine this value? Well,
that's why they come up with simple "rules of thumb" :-}!

Disclaimer: These opinions are my own, not necessarily my employer's.


-- 
Jack F. Vogel			jackv at locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv at turnkey.TCC.COM



More information about the Comp.unix.sysv386 mailing list