[erlang-questions] How to see which processes used ets table?

Ville Tuulos <>
Thu Feb 7 08:11:18 CET 2013


On Wed, Feb 6, 2013 at 6:14 PM, Björn-Egil Dahlberg
<> wrote:

> I'm still not convinced that this should be prioritized over something else.
> Runaway memory is, most of the time, bad flow control. Wouldn't it be better
> to solve that instead?

Here's my data point in support for the limits:

Bad flow control is exactly the reason why the process limits would be
useful for Disco: Disco communicates with an external worker process
over stdin/stdout using standard ports. As far as I know, open_port
doesn't include any mechanism to limit a rogue external process from
flooding the message queue of the Erlang process with tons of messages
in the matter of seconds, which can cause the whole VM to run out of
memory.

This could be fixed either by improving the flow control in open_port
or by limiting the number of messages and/or memory that can be used
by the controlling process.

Instead of trying to fix all possible horror scenarios with flow
control, the per-process limits seems like a more robust solution. It
is pretty much the same reason why OS-level containers such as OpenVZ
and LXC are so extremely useful, even if you don't need to worry about
security.

Ville



More information about the erlang-questions mailing list