From owner-freebsd-questions Sat Aug 23 17:05:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA22891 for questions-outgoing; Sat, 23 Aug 1997 17:05:21 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id RAA22885 for ; Sat, 23 Aug 1997 17:05:15 -0700 (PDT) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id KAA07489; Sun, 24 Aug 1997 10:02:41 +1000 Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id JAA02110; Sun, 24 Aug 1997 09:32:30 +0930 (CST) Message-ID: <19970824093230.57252@lemis.com> Date: Sun, 24 Aug 1997 09:32:30 +0930 From: Greg Lehey To: mikk0022@maroon.tc.umn.edu Cc: questions@FreeBSD.ORG Subject: Re: Low VM killing policy. References: <199708232130.QAA02348@x173-171.reshalls.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199708232130.QAA02348@x173-171.reshalls.umn.edu>; from mikk0022@maroon.tc.umn.edu on Sat, Aug 23, 1997 at 04:30:00PM -0500 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, Aug 23, 1997 at 04:30:00PM -0500, mikk0022@maroon.tc.umn.edu wrote: > I recently upgraded to XFree 3.3 + Matrox Millenium. The new server takes > up a lot of memory (RES: 11M according to top). This isn't particularly much. It'll get a lot bigger if you let it. My X server regularly goes over 30 MB. > This causes it to be killed whenever I get low on VM. Looks like you need more vm :-) > This is all well and good, except that XFree doesn't give up control of the > console when it dies. My machine is effectively locked, since I don't have > another machine I can use to contact it. > > Is there any way to "protect" a particular process from being killed when the > system runs out of memory? That is, could I tell the system to sacrifice > Netscape or something? Not that I know of. I consider it highly unlikely that the VM system could be trained to do that, since it doesn't really understand the concept of a process too well. It doesn't pick on X, it just picks on a specific segment. > Alternatively, is there a way that I could arrange to get control of the > console after XFree is killed? We were argu^H^H^H^Htalking about that in -hackers a while back. There is some hope, but first the VM86 functions need to be implemented. For the moment, though, I think your problem has a simpler solution: add more virtual memory (aka swap space). This won't make the machine blindingly fast, but it should stop your server getting killed all the time. If you're low on swap space (something I may have contributed to in "The Complete FreeBSD"), consider setting it to at least 100 MB. To monitor swap usage, use the pstat program. For example, I have two swap partitions: # pstat -s Device 1024-blocks Used Avail Capacity Type /dev/wd0s1b 51200 18944 32192 37% Interleaved /dev/sd0b 66036 18924 47048 29% Interleaved Total 117108 37868 79240 32% Greg