[erlang-questions] erlang:system_monitor in production?

Roger Lipscombe <>
Wed Apr 29 18:45:59 CEST 2015


Hmmm. Could that not be fixed with the new timing stuff in 18? It only
needs this-scheduler elapsed-time, right?

On 29 April 2015 at 15:50, Roberto Aloi <> wrote:
> Hi Roger,
>
>> Is it OK to have erlang:system_monitor permanently enabled in production?
>
>
> One problem with `erlang:system_monitor/X` combined with an option such as
> `long_gc`
> is that, for each GC, the C equivalent of `erlang:now/0` - which has some
> very well known overhead - is called before and after each GC:
>
> https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421
>
> In other words, keeping long_gc monitoring enabled will add a couple of sync
> points for each GC.
>
> Disclaimer: It was not me discovering this, but a colleague, so not taking
> any merit or blame for the discovery.
>
> Roberto


More information about the erlang-questions mailing list