[erlang-questions] Detecting high CPU utilisation in Erlang

Cian Synnott cian@REDACTED
Mon Apr 18 12:00:54 CEST 2016

Hi Trond,

On Mon, Apr 18, 2016 at 7:33 AM, Trond Endrestøl
<Trond.Endrestol@REDACTED> wrote:
> Is there a way for the Erlang RTS to detect high CPU utilisation and
> act accordingly? Could such events be handled by OTP supervisors?
Fred Hébert's "Stuff Goes Bad: Erlang in Anger" is the best resource
on this topic:

See especially chapters 5 (runtime metrics) and 8 (CPU and scheduler
hogs) for the available instrumentation.

Chapter 3 discusses the general problem of overload and strategies for
degrading service gracefully.

There are various applications that can help implement some of these
strategies, e.g. circuit breakers (https://github.com/jlouis/fuse,
https://github.com/klarna/circuit_breaker) or load regulation &
capacity management (https://github.com/esl/jobs,

The short answer is that there's no magic bullet in Erlang for this
type of problem - designing systems that are resilient to overload is
always difficult and application-dependent - but the instrumentation,
tooling and community support are in place to help.


More information about the erlang-questions mailing list