Created
September 27, 2018 17:51
-
-
Save garyharan/67363db1ffe965dd00922c4699e15af9 to your computer and use it in GitHub Desktop.
How to calculate maximum number of processes in Elixir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0..1_000_000 | |
|> Enum.each(fn(_n) -> | |
IO.puts "Creating process: #{Process.list |> Enum.count}" | |
spawn(fn -> Process.sleep(:infinity) | |
end) | |
end) |
TIL! Thank you!
You can also call into Erlang's system_info
, I don't know if there's an Elixir version of this function.
> :erlang.system_info(:process_limit)
262144
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's 262144 by default