process eating up all memory - what should happen next?

Polytropon freebsd at
Thu Mar 7 10:18:00 UTC 2013

On Thu, 7 Mar 2013 10:01:03 GMT, Anton Shterenlikht wrote:
> I have a process that eats up al memory,
> in my case science/paraview if I try to
> analyse a large model. What should FreeBSD
> do when a process tries to use all RAM or more?

In this case, the swap space would be used, until the
system runs out of swap space.

> I my case I get a complete freeze, can't even
> login from the console, and requiring a cold
> reboot. I guess this is not supposed to happen,
> but what is supposed to happen in situations like this?

A normal reboot (including a proper shutdown) should
at least be possible. If the machine seems to freeze
entirely, this simply looks wrong, so maybe it's more
than just eating all the RAM?

You could try to impose a resource limit, see "man limits"
for details, so you could "trigger" the undesired behaviour
while e. g. only 50% of the available RAM is being used
by _that_ process (and therefor still leaving enough
resources for other system and user processes). You could
also monitor resource consumption with tools like top,
htop, vmstat or systat in adjacent xterms while you run
the test, seeing "trouble pile up"...

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list