Re:Lovely Week with Elixir
by Scramblejams on Thursday May 21, 2020 @03:33AM
(#23255763)
We can't compare about CPU values
Can you explain more why we can't compare? Looking at this chart...
https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...
...shows pretty clearly how the CPU utilization grows linearly (ignoring some sawtooth) as the load increases, plateaus once the load remains constant, and then comes down linearly as the load decreases on the other end. Looks like a very clear mapping between work done and CPU load to me.
It is explained in the blog post after that benchmark - https://stressgrid.com/blog/beam_cpu_usage/ .
Essentially in order to optimise responsiveness the BEAM uses busy waiting, which in reality is not actually utilising the CPU as much as is reported by the OS, which results in misleading CPU usage being reported by the operating system.
The Bean keep using CPU even with no work to be done, so avoid context changes. We can't compare about CPU values.