From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a6037dada7c0fc9b,start X-Google-Attributes: gidfee84,public From: yanowitz@cs.umass.edu (Jason Yanowitz) Subject: [SUMMARY] swap space problems solved Date: 1995/07/27 Message-ID: <3v81nq$330@kernighan.cs.umass.edu>#1/1 X-Deja-AN: 107033220 organization: University of Massachusetts, Amherst reply-to: yanowitz@cs.umass.edu newsgroups: comp.unix.osf.osf1 [Thanks to: Peter R David pm@katz.cc.univie.ac.at (Peter Marksteiner) alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) mrave@brutus.bright.net (Mark Rave) all of whome provided help.] The problem: ------------ We were running out of swap space when there's plenty of it and RAM free. Messages like this in the logs: July 26 11:42:35 meol vmunix: Unable to obtain requested swap space July 26 11:42:35 meol vmunix: fork/procdup: task_create failed. Code: 0x6 July 26 11:42:42 meol vmunix: swap space below 10 percent free This is Not Good. The solution: ------------- 1) add more swap space or 2) delete /sbin/swapdefault (or move it to some other name) and reboot. The reason: ----------- As detailed in the swapon(8) man page, there are two methods of swapping: There are two strategies for swap space allocation: immediate mode and deferred or over-commitment mode. The two strategies differ in the point in time at which swap space is allocated. If immediate mode is used, swap space is allocated when modifiable virtual address space is created. If deferred mode is used, swap space is not allocated until the system needs to write a modified virtual page to swap space. Immediate mode is the default swap space allocation strategy. [I hope this quote constitutes fair use.] The presence of /sbin/swapdefault determines the behavior (it's a symlink to the swap partition). Alan Rollow points out that eliminating this means you risk a denial of service attack because someone can use up all the resources on the system, causing things to get killed, etc. You need to evaluate how important this is to you. An aside: -------- I would like to apologize for asking a question that was answered fairly clearly in the man pages (a man page I had glanced at, no less, but had skimmed to quickly (I just saw all the "not yet implemented" options and got discouraged)). Everyone was extremely polite about it, but I still feel bad. So, my apologies to all. My solace is that I often answer questions which are FAQ/RTFMs in the same way (give the answer, point to the answer source in a polite manner) so I guess "treat others as you wish to be treated" actually paid off. My father will be thrilled. Other stuff solved: ------------------- In the course of this, I discovered that our kernel was configured with MAX_USERS set to 32. Someone at DEC told me I should set it to at least 1000. This is not really the "maximum number of users that can log in" but is some magical number used to calculate various things like (I believe) how big the process table can get. Regardless, I upped it per her recommendation (change the value, rebuild the kernel). Also, I was alerted to the existence of monitor(1), which is on gatekeeper. grab the version with alpha in its title. It's a tar file, by the way (which you can quickly discern by looking at it, despite the flawed filename and the less-than-complete magic file on my Dec Unix 3.0 system). Again, my immense thanks to those listed above. -- Jason -- lkes uxvwo?