<div dir="ltr">Since the cognoscenti are talking about parallelism, maybe someone can answer something that has been perplexing me.<br><br>Sometimes it has been measurably faster on a multicore system to run one VM per core, each with SMP disabled (or +S 1), than it is to run one or more SMP VMs. This is true even when running code that is innately parallel. On the other hand, I have seen benchmarks that show near-linear speedups using SMP. <br>
<br>I don't have code to support this; it's just something I, along with a
couple of other people -- for whom I don't want to speak -- have
noticed in passing.<br>
<br>
Does anyone have any insight into the internals of SMP who can tell me when SMP might be an asset, and when a liability? I know this is a "how long is a piece of string" question, but even though it's pretty general, someone somewhere who really knows Erlang inside out (i.e. not me) must surely have encountered this phenomenon.<br>
<br>Are there conditions where contention between the threads of the SMP processes (e.g. mutexes) becomes significant enough that multiple separate non-SMP VMs perform better? If so, what would those conditions be?<br><br>
Could it have anything to do with the mix of CPU-bound processes and inter-process messaging or network I/O? If so, please could someone explain the mechanism?<br><br>Anyone?<br><br></div>