Skip to content

Latest commit

 

History

History
76 lines (44 loc) · 2.08 KB

bench.md

File metadata and controls

76 lines (44 loc) · 2.08 KB

libp2p-pubsub-benchmark

Benchmarking asyncmachine-go based implementation of libp2p-pubsub from github.com/pancsta/go-libp2p-pubsub.

TestSimpleDiscovery #1

Versions being compared

  • origin
  • state based (RPC as a channel)

Steps taken in the test

  1. Init a pubsub network of {h} hosts
  2. Subscribe with all but host0
  3. Publish a single message from host0
  4. Publish random msgs - {m} per host

Variables

  • h:hosts Num. of hosts in the pubsub network
    • 5 to 20
    • step by 5
  • m:messages Num. of sent messages (per host)
    • 20 to 100
    • step by 20

Machines

  1. PubSub host (20 states)
  2. Discovery (10 states)
  3. DiscoveryBootstrapFlow (5 states)

Test duration

Test duration chart

Created goroutines

created goroutines chart

Final goroutines

Final goroutines chart

Allocated memory

Allocated memory chart

Memory ceiling

Memory ceiling chart

Final memory

Final memory chart

GCed memory

GCed memory chart

Failure rate (states)

Failure rate (states) chart

Failure rate (origin)

Failure rate (origin) chart

Conclusions

Although the duration and peak memory usage has a reasonable overhead of ~10%, the failure rate needs further looking into, along with final goroutines.

Footer

Version 20240601-v5.0.0 from github.com/pancsta/go-libp2p-pubsub-benchmark