<div dir="ltr"><div>Hi Roger,</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Is it OK to have erlang:system_monitor permanently enabled in production?<br></blockquote><div><br></div><div>One problem with `erlang:system_monitor/X` combined with an option such as `long_gc`<br>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:</div><div><br></div><a href="https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421">https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">In other words, keeping long_gc monitoring enabled will add a couple of sync points for each GC.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Disclaimer: It was not me discovering this, but a colleague, so not taking any merit or blame for the discovery.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Roberto</div>
</div></div>