Skip to content

Benchmark

salboaie edited this page Nov 13, 2012 · 9 revisions

Take 5 minutes to study the source code for the swarm for benchmarking here

How to start benchmark:

In an adaptor start "BenchMark.js" benchmark:

startSwarm("BenchMark.js","ctor",48000);

Or in a SwarmClient (look in test/BenchmarkTest.js for code):

client.startSwarm("BenchMark.js","ctor",48000);

Parameters: 48000 is the number of phases that will be started in parallel in 3 nodes (adaptors) and the end, the "printResults" phase will print the number of phases finished per second.

Results will be like:

**Benchmark results: 40101 phases per second! Time spent: 1.197seconds **

In above example, in 1.1 seconds, 48000 phases got executed.

Conclusions:

We noticed that having parallel execution in more nodes it is increasing the number of phases per second but Redis channels is obviously adding limits (bottleneck). In future,if we will find Redis limits significant for our use cases or at community requests, we plan to replace Redis's pub/sub channels with faster, distributed message queues or even with UDP communication)

Clone this wiki locally