[erlang-questions] Re: Unicast 20k messages, $500-$1000 bounty
Thu Jul 16 17:35:55 CEST 2009
I'd like to introduce another useful constraint into the equation.
You must grab the timestamp _before_ you start broadcasting since what
we are trying to measure is delivery time from the moment the message
The time it takes for the message to travel through the server and
into pubsub:publish is rather small and can be ignored but resetting
the timestamp before sending the message to each client both skews the
timings and does not measure "time from publishing".
With that in mind, here's my latest set of Mac timings: 2s, 2.2s and
2.3s for 20k messages, with the starting time captured before
I traded the time taken to broadcast to a list over the time and
effort taken to subscribe and unsubscribe. Setup time is much longer
now since inserting, deleting and searching a tuple list of 20k items
is garbage collection galore. Traversal time of 617.352ms, 645.084ms,
871.228ms and 697.16ms beats anything we have seen from ETS so far and
I'm only looking at a maximum of 20k subscribers per server.
I think it's better to build the list over time than to build it from
ets at broadcasting time.
()3> bot:test(flashbot, 20000).
=INFO REPORT==== 16-Jul-2009::16:10:26 ===
setup: 154206.92ms, good: 20000, bad: 0, run: 157926.75ms
2.4990ms | min
500.0000ms | 2359 - 11.79%
1000.0000ms | 6323 - 31.61%
1500.0000ms | 4934 - 24.67%
2000.0000ms | 5769 - 28.84%
2500.0000ms | 615 - 3.08%
2078.7770ms | max
()4> bot:test(flashbot, 20000).
=INFO REPORT==== 16-Jul-2009::16:16:36 ===
setup: 150305.92ms, good: 20000, bad: 0, run: 154186.14ms
2.1070ms | min
500.0000ms | 2235 - 11.18%
1000.0000ms | 4840 - 24.20%
1500.0000ms | 5497 - 27.48%
2000.0000ms | 5283 - 26.41%
2500.0000ms | 2145 - 10.72%
2185.3810ms | max
()5> bot:test(flashbot, 20000).
=INFO REPORT==== 16-Jul-2009::16:22:07 ===
setup: 201656.95ms, good: 20000, bad: 0, run: 205959.23ms
2.5690ms | min
500.0000ms | 2573 - 12.86%
1000.0000ms | 2704 - 13.52%
1500.0000ms | 5835 - 29.18%
2000.0000ms | 5527 - 27.63%
2500.0000ms | 3361 - 16.80%
2371.7610ms | max
()6> bot:test(flashbot, 20000).
=INFO REPORT==== 16-Jul-2009::16:29:57 ===
setup: 153129.67ms, good: 20000, bad: 0, run: 157174.14ms
3.4600ms | min
500.0000ms | 2682 - 13.41%
1000.0000ms | 3922 - 19.61%
1500.0000ms | 5523 - 27.62%
2000.0000ms | 4728 - 23.64%
2500.0000ms | 3145 - 15.72%
2295.7770ms | max
Mac hacker with a performance bent
More information about the erlang-questions