Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!turnkey!jackv From: jackv@turnkey.tcc.com (Jack F. Vogel) Newsgroups: comp.unix.sysv386 Subject: Re: out of swap space?? Message-ID: <1991May02.162141.1178@turnkey.tcc.com> Date: 2 May 91 16:21:41 GMT References: <1991Apr23.214037.16410@netcom.COM> <1991Apr24.123035.4193@virtech.uucp> <455@jgaltstl.UUCP> Reply-To: jackv@turnkey.TCC.COM (Jack F. Vogel) Organization: Turnkey Computer Consultants, Westchester, CA Lines: 33 In article <455@jgaltstl.UUCP> terry@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@locus.com AIX370 Technical Support - or - Locus Computing Corp. jackv@turnkey.TCC.COM