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)

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

To Unsubscribe: send mail to
with "unsubscribe freebsd-current" in the body of the message

Reply via email to