Occasional high load caused by BEAM (?)

While running a phx development server, I experience occasional system load surges, with all cores maxed and busy running some BEAM related processes. After a few(-teen) seconds the load goes away. Until next time that is. What can this be? An equivalent of early JVMs flushing system’s performance down the tube in order to do some garbage collection? :wink: Is this “normal”?

Try closing your editor and then run the dev server. It’s possibly the LS or Dialyzer…?

1 Like

Hm - interesting. Shall try though.

Erlang VM “busy waits” under certain conditions. You can turn it off with some erlang flags though. I find it’s often a reason why my CPU in virtual machines seems high, or I get phantom CPU usage. I’m not clear on what is going wrong, but there are a few blog articles on how to get more detail (sorry, don’t have the links to hand). I believe a lot more debugging got added in one of the recent Erlang releases

1 Like

To me it would look more like this than some linter(s) running. Processes that take over the machine have “beam” in their lines. I think it’s beam.smp. Can’t be 100% sure now, as during the time I realise what’s happening and start to check it usually goes away.

Keep in mind that beam.smp still could be anything running on the beam, like the elixir-ls server or other elixir based dev tools running at the time.

I understand. That’s why I committed to try that path too. Problem with hunting this down is that I can’t find any pattern for triggering this behaviour, while OTOH it doesn’t happen often enough to stay always on alert.