[erlang-questions] Detecting high CPU utilisation in Erlang

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Apr 18 13:44:41 CEST 2016


On Mon, Apr 18, 2016 at 8: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?
>

One thing is detecting high CPU, which the os_mon application will do, and
then raise an alarm if it is consistenly high. The other thing is doing
something about it.

Some systems are operating nominally when their CPU load hits 100%, whereas
this is a grave outlier in others. One system which can be used is
uwiger/jobs, which allow you to plug into the high-CPU scenario and apply
dampening to your queueing systems. Coupled with some kind of queue
priority, it can be used to avoid processing excess amounts of data.

In general, the rule of the border applies: detect overload early and
reject service at the border of the system boundary. Once a job is
accepted, process it to the end.


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160418/2086dd38/attachment.htm>


More information about the erlang-questions mailing list