ElixirTalk / elixirtalk

ElixirTalk Podcast
https://soundcloud.com/elixirtalk
40 stars 2 forks source link

How does the VM handle processes that hog memory / cpu? #26

Closed elijahkim closed 6 years ago

elijahkim commented 6 years ago

If there's a process running that consistently does heavy operations, how does the VM allocate resources to it?

For example, consider an application that has two processes, one that consistently polls itself at a ridiculous rate, let's call process Heavy, and does some heavy computation and another process, let's call process Light, that doesn't do much at all. How would the VM allocate it's resources?

In the same vein, what if process Heavy exists in an application with millions of Light Processes? Will the millions of Light processes slow down due to Heavy? If that's the case, how do you guard against it happening?

Thanks!

desmondmonster commented 6 years ago

https://soundcloud.com/elixirtalk/episode-111-using-javascript-in-phoenix-beam-vm-handling-processes-that-hog-cpu