Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 1997 09:32:30 +0930
From:      Greg Lehey <grog@lemis.com>
To:        mikk0022@maroon.tc.umn.edu
Cc:        questions@FreeBSD.ORG
Subject:   Re: Low VM killing policy.
Message-ID:  <19970824093230.57252@lemis.com>
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
References:  <199708232130.QAA02348@x173-171.reshalls.umn.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970824093230.57252>