3 ms·
Erlang SMP is successful on one axis (ease of writing correct and reliable concurrent problems), but it seems to me that the argument in the article was about t
by kscaldef 16y ago
Erlang SMP is successful on one axis (ease of writing correct and reliable concurrent problems), but it seems to me that the argument in the article was about the performance costs of the model. And, at least as of a year or two ago, Erlang SMP did _not_ have good performance. There was a minimum factor of 2 overhead in total CPU usage just by turning on SMP, and heavily concurrent programs could run massively slower (http://shootout.alioth.debian.org/u64q/benchmark.php?test=chameneosredux&lang=all http://shootout.alioth.debian.org/u64q/benchmark.php?test=ch...). At least part of the problem is that there's no affinity between Erlang processes and scheduler threads (and, therefore, CPU/cores), so you've got constant cache misses. There's probably other issues as well. As the author says, it's a hard problem.
- gtani 16y agostackoverflow shows recent BEAM and secret incantation (I haven't tried this yet, maybe tonite) http://stackoverflow.com/questions/1996524/optimizing-performance-on-erlang-processes/1998048#1998048 http://stackoverflow.com/questions/1996524/optimizing-perfor...
- kscaldef 16y agoThere was definitely a lot of discussion of these issues going on the last time I was playing around with Erlang, so it's quite possible progress has been made. My recommendation is to take my comments with a grain of salt, and comments on stackoverflow, and micro-benchmarks; and do your own testing and tweaking for your workload.
- igouy 16y ago"About Erlang/OTP and Multi-core performance in particular" http://www.erlang-factory.com/conference/London2009/speakers/kennethlundin http://www.erlang-factory.com/conference/London2009/speakers...
- gtani 16y agogory details in release notes: http://www.erlang.org/download/ http://www.erlang.org/download/ (files otp_src_R*.readme ) especially: http://www.erlang.org/download/otp_src_R13B01.readme http://www.erlang.org/download/otp_src_R13B01.readme
- igouy 16y ago> There was a minimum factor of 2 overhead in total CPU usage just by turning on SMP n-body without SMP 123.30s n-body without SMP 123.30s elapsed n-body with SMP 133.52s n-body with SMP 133.57s elapsed spectral-norm without SMP 46.68s spectral-norm without SMP 46.68s elapsed spectral-norm with SMP 47.71s spectral-norm with SMP 13.90s elapsed mandelbrot without SMP 230.07s mandelbrot without SMP 230.10s elapsed mandelbrot with SMP 253.66s mandelbrot with SMP 87.76s elapsed Maybe that Erlang chameneos-redux program is unusual?
- kscaldef 16y ago"at least as of a year or two ago". So, maybe, as other people have pointed out and as I've already acknowledged, the situation may have improved.