Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!ksand From: ksand@Apple.COM (Kent Sandvik) Newsgroups: comp.unix.aux Subject: Re: Running out of swap space? Keywords: swap, AUX, A/UX, 2.0 Message-ID: <48324@apple.Apple.COM> Date: 21 Jan 91 18:04:54 GMT References: <22762@well.sf.ca.us> <48302@apple.Apple.COM> <1991Jan21.043607.22853@servalan.uucp> Distribution: usa Organization: Apple Computer Inc., Cupertino, CA Lines: 47 In article <1991Jan21.043607.22853@servalan.uucp> rmtodd@servalan.uucp (Richard Todd) writes: >ksand@Apple.COM (Kent Sandvik) writes: >>In article <22762@well.sf.ca.us> espen@well.sf.ca.us (Peter Espen) writes: > >>> I have a 26K block partition on my A/UX 2.0 system. Why >>>do I start getting out of swap space errors to the console >>>when a swap -l command shows that I have 13K blocks of >>>free swap space? > >>The swap space is used all the time, for instace a big process >>(X Server or something similar) has to be swapped out, however >>there's not enough space for the swap. In most cases one needs >>to create more swap space, either on the same or another hard disk >>drive. There is no such thing as virtual memory. > >That's all true, but it doesn't answer the question, namely, why the kernel >says "WARNING: Swap Space Running Low" when you're *nowhere* *near* having >the swap space full. I have two swap partitions, each one 10 Meg. Current >total usage by all processes (as best I can tell, from a little VM monitor >program I wrote), is around 13M. Given an 8M Mac with about 5.5M free for >processes, that means that only about 7.5M of swap space should be in >use, and indeed as we can see: >37 servalan /usr/spool/uucp[5:34pm] % swap -l >path dev swaplo blocks free >/dev/dsk/c0d0s1 24,1 0 20480 11792 >/dev/dsk/c2d0s1 26,1 0 20480 15216 >Noting that a "block" is 0.5K, this does indeed work out to about 7M of swap >space in use out of a total of 20M. So why does the kernel insist on giving >warnings when less than half of my swap space is actually in use? > > In answer to the original poster: Ignore the warnings. Trust me, when you >really run out of swap space, you'll know it :-). Well, I can't answer much to that :-). Only that measuring swap space sizes in a multitasking environment is a tricky thing. One moment you measure it's OK, meanwhile the scheduler is pushing for more space for a swap. I've seen these messages with big processes running in the system, and sure more swap space seems to help... Regards, Kent Sandvik -- Kent Sandvik, Apple Computer Inc, Developer Technical Support NET:ksand@apple.com, AppleLink: KSAND DISCLAIMER: Private mumbo-jumbo Zippy++ says: "Read my lips, no more C++ syntax..."