Ask stupid questions and you'll get a stupid answers, was: Technological advantages over Linux

Aryeh Friedman aryeh.friedman at
Sun Jul 26 15:38:38 UTC 2020

On Sun, Jul 26, 2020 at 11:18 AM Victor Sudakov <vas at> wrote:

> Steve O'Hara-Smith wrote:
> >
> > > FreeBSD freezes, then kills some innocent random processes like
> > > local_unbound, then it may slowly recover. Sometimes it guesses
> > > correctly and kills the offender (firefox most often).
> >
> >       What else would you have it do ?  Kill the largest process ? Kill
> > the last process to call malloc ? There is no good response to OOM. The
> OS
> > has no way to know which processes you care about most.
> AFAIK the Linux OOM killer uses multiple weighted criteria to decide
> which process to kill. Each process has an oom_score showing its
> eligibility to be killed.
> So at least Linux attemps intelligent killing. What about FreeBSD?

Every time a piece of software and/or algorithm attempts to be
"intelligent" the only thing it succeeds in doing is being "too smart for
its own good" (there will always be exceptions and odds are the
first/normal real world use of it will be just such an exception, but the
algorithm thinks it knows best and does the wrong thing).   Thus using the
simplest measure (like last reference or cpu usage is a good measure
[assuming it is not using the cpu due to I/O waiting]) is likely the best
and that's what FreeBSD does.

Note except for the case of bugs (like the one being discussed in the other
subthread) it is very unlikely that you will ever encounter OOM on a real
machine these days and if you have an app that might cause an OOM due to
its nature then that program almost always has its own swap like feature
that it manages on its own.   Good example is vi and large files, vi does
not keep the whole file in memory, but only window on the current cursor

Aryeh M. Friedman, Lead Developer,

More information about the freebsd-questions mailing list