Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Apr 1999 16:52:04 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        alk@pobox.com, current@freebsd.org
Subject:   Re: swap-related problems
Message-ID:  <37159AA4.8F513E83@newsguy.com>
References:  <14100.61923.427423.153188@avalon.east> <371572E4.D9C64C93@newsguy.com> <14101.33255.671010.718409@avalon.east>

next in thread | previous in thread | raw e-mail | index | archive | help
Anthony Kimball wrote:
> 
> Quoth Daniel C. Sobral on Thu, 15 April:
> :
> : As soon as this application grabs all the memory, the next thing to
> : request more memory (not a malloc!) will cause the application to be
> : killed (largest application criteria). Change the criteria, and
> : *another* application gets killed. Any application getting killed is
> : a problem, you'll find very fast.
> 
> Let's not try to solve the unsolvable problem, just the solvable part.  If
> you can't tolerate anything getting killed, you can't use an
> overcommit system, or you must control allocation by manual policy.

What would you have killed? Why not run it in first place? Well, if
you did not run it, it's memory would be taken by the memory-grabber
process, and something else would get killed. So, you need something
killable running just so the memory-grabber will stop at some point
where there is still enough memory free to do the minimum management
necessary (things like cron, inetd -- forget about X), *after* the
killable processes get killed.

Does that sound like taking too many turns? It is. You would have to
measure how much you need, and then have a set of processes just for
the sake of getting killed.

So, let me asking to consider something. Why not setting a datasize
memory limit for the memory-grabbing process instead? Set it to
almost all memory, leaving just enough for minimum usability. Well,
surprisingly (not!), FreeBSD supports that.

In other words, FreeBSD already has a real, working solution. It's
just that it seems not to sink in the head of some people that what
they are asking for doesn't work(*), and what they have been
discarding as a solution does work.

(*) Yeah, a full pre-allocate solution would work too. I just don't
see a point in using that solution since the memory-grabbing program
would have a lot less memory to grab.

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	"Well, Windows works, using a loose definition of 'works'..."




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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