We're currently working on a proof-of-concept for Bitswap to improve performance by disseminating information about how blocks are distributed amongst peers. This issue outlines the remaining steps required to complete it:
After landing PoC:
We collected performance data comparing Bitswap master against the proof-of-concept branch using a testground test suite.
In particular we are interested in comparing





These graphs are for 1 leech fetching from 1, 2 and 4 seeds with 5ms latency and 10MB, 20MB, 40MB, 160MB and 1024MB bandwidth.
For high bandwidth:
For low bandwidth:




These graphs are for 3 leeches downloading simultaneously from 3 seeds. It seems like at any bandwidth the results are similar:





These graphs show the number of duplicate blocks received by the leech for 1, 2 and 4 seeds.
Note that in the case of 1 leech / 1 seed, there will be no duplicates.
The points are highly scattered, but the results are generally as expected:





These results for variable bandwidths with 100ms latency are similar to those with 5ms latency above.
OMG SHIP IT! (@hinshun - some pretty graphs to show off validating all the great work)
Fantastic perf improvements! Great graphs! 馃帀馃巻鉂わ笍馃殌
Holy ship! 馃殌
Shout out to @Stebalien with whom we came up with the design ideas, and who reviewed the 9,000 line PR, @hinshun who created the test environment to validate the initial proof-of-concept and to the testground team 鉂わ笍
This is amazing. Great work all around. We're super excited to see this make it to production.
Fantastic! This is great stuff @dirkmc :)
馃帀
Most helpful comment
Performance comparison of master vs proof-of-concept
We collected performance data comparing Bitswap master against the proof-of-concept branch using a testground test suite.
In particular we are interested in comparing
5ms latency, variable bandwidth: 1 seed, 2 seeds, 4 seeds
These graphs are for 1 leech fetching from 1, 2 and 4 seeds with 5ms latency and 10MB, 20MB, 40MB, 160MB and 1024MB bandwidth.
For high bandwidth:
For low bandwidth:
5ms latency, variable bandwidth: 3 leeches fetching from 3 seeds
These graphs are for 3 leeches downloading simultaneously from 3 seeds. It seems like at any bandwidth the results are similar:
Duplicate blocks - 5ms latency, variable bandwidth: 1 seed, 2 seeds, 4 seeds
These graphs show the number of duplicate blocks received by the leech for 1, 2 and 4 seeds.
Note that in the case of 1 leech / 1 seed, there will be no duplicates.
The points are highly scattered, but the results are generally as expected:
100ms latency / variable bandwidth: 1 seed, 2 seeds, 4 seeds
These results for variable bandwidths with 100ms latency are similar to those with 5ms latency above.