Here's some suggestions for additional benchmark tests that might help us identify more performance bottlenecks for us to address. Feedback is welcome - are these good tests? Are there different things we should be testing? Are we missing tests?
Test | js0 -> js0 | js0 -> js1 | go0 -> go0 | go0 -> go1 | js0 -> go0 | go0 -> js0 | js01234 -> js5 | go01234 -> go5 |
---|---|---|---|---|---|---|---|---|
Node initialization | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add small file (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add many small files (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add large file (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add small file (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add many small files (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add large file (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat small file (local) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat small file (tcp, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat small file (websocket, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, mplex) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (tcp, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (websocket, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, mplex, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (tcp, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat small file (websocket, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, spdy) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (tcp, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (websocket, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, spdy, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (local) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat large file (tcp, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat large file (websocket, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, mplex) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (tcp, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (websocket, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, mplex, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (tcp, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat large file (websocket, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, spdy) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (tcp, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (websocket, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, spdy, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
MFS write small file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write many small files (10k+) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write large file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to dir with < 1,000 files | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to dir with > 1,000 files | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to deeply nested dir | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS read a small file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS read a large file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS cp a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS mv a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS rm a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS stat a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Pubsub publish & receive a message | n/a | π | n/a | π | π | π | n/a | n/a |
Pubsub publish & receive 1k messages | n/a | π | n/a | π | π | π | n/a | n/a |
- balanced - use balanced DAG strategy (the default)
- trickle - use trickle DAG strategy
- tcp - libp2p transport over TCP js-libp2p-tcp
- websocket - libp2p transport over websockets js-libp2p-websocket-star
- webrtc - libp2p transport over webrtc js-libp2p-webrtc-star
- mplex - libp2p multiplexer js-libp2p-mplex
- spdy - libp2p multiplexer js-libp2p-spdy
- secio - libp2p connection encryption channel js-libp2p-secio
- π - test exists
- π - test not exists
- js0 -> js0 - A local test from one JS IPFS node to the same node
- js0 -> js1 - A test between two JS IPFS nodes
- go0 -> go0 - For comparison with js0 -> js0
- go0 -> go1 - For comparison with js0 -> js1
- js0 -> go0 - A test between a JS IPFS node and a Go IPFS node
- go0 -> js0 - For comparison with js0 -> go0
- js01234 -> js5 - A test from multiple JS IPFS nodes to a single JS IPFS node
- go01234 -> go5 - For comparison with js01234 -> js5
Test | js0 -> js0 | js0 -> js1 | go0 -> go0 | go0 -> go1 | js0 -> go0 | go0 -> js0 | js01234 -> js5 | go01234 -> go5 |
---|---|---|---|---|---|---|---|---|
Node initialization | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add small file (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add many small files (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add large file (balanced) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add small file (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add many small files (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Add large file (trickle) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat small file (local) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat small file (websocket, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, mplex) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (websocket, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, mplex, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (websocket, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, spdy) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat small file (websocket, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat small file (webrtc, spdy, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (local) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Cat large file (websocket, mplex) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, mplex) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (websocket, mplex, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, mplex, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (websocket, spdy) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, spdy) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
Cat large file (websocket, spdy, secio) | n/a | π | n/a | π | π | π | π | π |
Cat large file (webrtc, spdy, secio) | n/a | π | n/a | n/a | n/a | n/a | π | n/a |
MFS write small file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write many small files (10k+) | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write large file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to dir with < 1,000 files | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to dir with > 1,000 files | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS write to deeply nested dir | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS read a small file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS read a large file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS cp a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS mv a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS rm a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
MFS stat a file | π | n/a | π | n/a | n/a | n/a | n/a | n/a |
Pubsub publish & receive a message | n/a | π | n/a | π | π | π | n/a | n/a |
Pubsub publish & receive 1k messages | n/a | π | n/a | π | π | π | n/a | n/a |
- DHT (not yet in JS IPFS) - what would be a good way to test this?
- Tests via a relay node
- Tests for IPNS publish and resolve (not yet in JS IPFS)
IPFS nodes in benchmark tests should:
- Not connect to bootstrap nodes (https://github.com/ipfs/js-ipfs#optionsconfig)
- Have preloading disabled (https://github.com/ipfs/js-ipfs#optionspreload)
- Disable discovery
For connecting peers you'll need to use the ipfs.swarm.connect
API.
TODO instructions for enabling different transports in both browsers - for JS IPFS see https://github.com/ipfs/js-ipfs#optionslibp2p
For browser tests you'll need to run a rendezvous server:
This is a good start, I think more benchmarks for moving the files around with the varying configurations will be helpful for seeing where things fall over. (I think there are some existing issues with go-libp2p-spdy failing with large data, for example).
For things like DHT and pubsub, we have some goals in libp2p land to get some scaling performance tests together. Vasco is working on some DHT stress testing (with js-ipfs) already https://github.com/vasco-santos/iptb-dht-test via IPTB. We're still a bit away from being able to benchmark the performance tests, but that's our end goal. Our goal is try to find out where libp2p itself has problems and so that we can compare various network states, such as: what happens when we turn relay on by default everywhere. I think that work will supplement this nicely.