-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network Backend: libp2p is faster than litep2p #7183
Comments
@lexnv is this a blocker for litep2p deployment ? |
@AndreiEres can we re-run one of these benchmarks (perhaps the 64k and 256k ones) and measure:
|
Gathering more data from our Kusama Validators to see how this stacks in production Libp2p DataData obtained from one single kusama validator running libp2p: Have asked devops to reboot this node with Grafana Link: https://grafana.teleport.parity.io/goto/aKLWk8DNg?orgId=1 |
@lexnv @dmitry-markin |
@sandreim Avg throughput per second (higher is better)
Avg time per message (lower is better)
Raw data from benchmarks1k messages notifications_protocol/libp2p/with_backpressure/64KB: 44421256 ns/iter (+/- 309026) notifications_protocol/libp2p/with_backpressure/256KB: 359526580 ns/iter (+/- 2611825) notifications_protocol/litep2p/with_backpressure/64KB: 46879477 ns/iter (+/- 327248) notifications_protocol/litep2p/with_backpressure/256KB: 413041795 ns/iter (+/- 4181491) 5k messages notifications_protocol/libp2p/with_backpressure/64KB: 220405786 ns/iter (+/- 1849544) notifications_protocol/libp2p/with_backpressure/256KB: 1814364552 ns/iter (+/- 18384018) notifications_protocol/litep2p/with_backpressure/64KB: 247287037 ns/iter (+/- 8365376) notifications_protocol/litep2p/with_backpressure/256KB: 2008662039 ns/iter (+/- 78304950) 10k messages notifications_protocol/libp2p/with_backpressure/64KB: 443843240 ns/iter (+/- 1671193) notifications_protocol/libp2p/with_backpressure/256KB: 3564711134 ns/iter (+/- 18137773) notifications_protocol/litep2p/with_backpressure/64KB: 485836412 ns/iter (+/- 4307439) notifications_protocol/litep2p/with_backpressure/256KB: 3834542336 ns/iter (+/- 316935009) |
Thanks @AndreiEres . Looks like libp2p is roughly 10% faster. I would not consider this a blocker since the difference is not that much and we still reap the benefits of lower CPU usage. @lexnv WDYT ? |
The data looks good! Thanks @AndreiEres ! 🙏 Indeed, I don't consider this a major blocker, especially since we're only about 10% behind libp2p. Attaching one more data point, from around ~15:25 UTC the validator was restarted with litep2p. Overall, litep2p handled 13-21% more inbound notifications (1927 litep2p vs. 1588 libp2p), while libp2p managed about 15% more outbound notifications (1228 litep2p vs. 1430 libp2p). We should also factor in the randomness of the network when interpreting these results. |
Coming back with more data, the litep2p yamux component was updated to filter out any incompatibilities between libp2p and litep2p. The update brings significant improvements in upstream benchmarks (libp2p realm). I've only tested this with 1K message and would love to run some more tests: Before
After
Interpreting Data
|
Recently, we began running benchmarks to compare the libp2p and litep2p implementations of NetworkBackend. We tested both implementations in two modes:
The second mode is intended to demonstrate usage that closely resembles reality.
According to initial results from the notifications protocol, litep2p is faster with serial work, while libp2p performs better with backpressure. This means that either our benchmarks are incorrect or we can slow down gossiping after switching nodes to litep2p.
Benchmarks:
Charts:
@paritytech/networking
The text was updated successfully, but these errors were encountered: