[erlang-questions] SMP performance with hackbench
Thu Aug 20 00:47:06 CEST 2009
One thing - good or bad...
The original code contains lines like this.
/* Wait for start... */
And in main()
/* Kick them off */
if (write(wakefds, &dummy, 1) != 1)
barf("Writing to start them");
This will ensure that setup and execute phases are not mixed.
But the timer reported is the total time anyway.
The processes are quite short lived. But will the list of receivers fit in the
default data memory?
Maybe the solution would be to add more processess... Coding...
(Module name does not match in code)
Testrun - it you sit by the computer you can hear the swapping...
Aha, there is NO flow control.
Each receiver might queue up ALL messages from ALL senders.
The key here is the inputs/outputs/pagefaults
- this application should not need any IO!
> root@REDACTED:~/hackbench# \time ./run_one_erl.sh
> Time is 62.260995
> 295.67user 110.62system 1:14.27elapsed 546%CPU (0avgtext+0avgdata
> 11776inputs+8outputs (27major+90965minor)pagefaults 0swaps
> (2) SMP disable
> root@REDACTED:~/hackbench# \time ./run_one_erl.sh "-smp disable"
> Time is 54.14644
> 54.23user 0.33system 1:05.66elapsed 83%CPU (0avgtext+0avgdata
> 3968inputs+8outputs (22major+36520minor)pagefaults 0swaps
More information about the erlang-questions