Benchmarking asyncmachine-go based implementation of libp2p-pubsub from github.com/pancsta/go-libp2p-pubsub.
Versions being compared
- origin
- state based (RPC as a channel)
Steps taken in the test
- Init a pubsub network of
{h}
hosts - Subscribe with all but host0
- Publish a single message from host0
- 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
- PubSub host (20 states)
- Discovery (10 states)
- DiscoveryBootstrapFlow (5 states)
Although the duration and peak memory usage has a reasonable overhead of ~10%, the failure rate needs further looking into, along with final goroutines.
Version 20240601-v5.0.0
from github.com/pancsta/go-libp2p-pubsub-benchmark