A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Libp2p Gossipsub simulation | ||||||||||||||||||||||||||
2 | |||||||||||||||||||||||||||
3 | Each sheet in this document contains gossip simulation results with raw data and a number of charts illustrating the most significant values | ||||||||||||||||||||||||||
4 | Writeup: | https://hackmd.io/ZMBsjqdqSAK026iFFu_2JQ | |||||||||||||||||||||||||
5 | The simulator is implemented in Kotlin on top of JVM-Libp2p library. It is now resides in Libp2p test module as a set of JUnit tests (this is likely subject to change): | ||||||||||||||||||||||||||
6 | https://github.com/libp2p/jvm-libp2p/blob/feature/simulator/src/test/kotlin/io/libp2p/simulate/gossip/Simulation1.kt | ||||||||||||||||||||||||||
7 | |||||||||||||||||||||||||||
8 | Simulation config: | Reference vals | |||||||||||||||||||||||||
9 | totalPeers | 10000 | The total number of nodes in the network | ||||||||||||||||||||||||
10 | badPeers | 5000 | The number of bad peers. Currently the peer is called 'bad' if it doesn't propagate incoming messages | ||||||||||||||||||||||||
11 | gossipD | 6 | Gossip topic stable mesh target count | ||||||||||||||||||||||||
12 | gossipDLow | 5 | Gossip topic stable mesh low watermark | ||||||||||||||||||||||||
13 | gossipDHigh | 7 | Gossip topic stable mesh high watermark | ||||||||||||||||||||||||
14 | gossipDLazy | 6 | Gossip target - number of topic peers (oustide mesh) which the gossip is sent to | ||||||||||||||||||||||||
15 | gossipAdvertise | 3 | Number of windows to gossip about | ||||||||||||||||||||||||
16 | gossipHistory | 5 | Number of heartbeat intervals to retain message IDs | ||||||||||||||||||||||||
17 | gossipHeartbeat | 1 sec | Frequency of heartbeat | ||||||||||||||||||||||||
18 | avrgMessageSize | 32Kb | Gossip message payload size used when calculating network traffic | ||||||||||||||||||||||||
19 | topology | The network topology: | |||||||||||||||||||||||||
20 | RandomNPeers(20) | Each peer is randomly connected to other 20 peers | |||||||||||||||||||||||||
21 | latency | 1 ms | Latency of message propagation through a connection | ||||||||||||||||||||||||
22 | |||||||||||||||||||||||||||
23 | Simulation options: | ||||||||||||||||||||||||||
24 | warmUpDelay | 5 sec | Time to rewind before the first message. After building the network the peers need some time to build own gossip meshes | ||||||||||||||||||||||||
25 | zeroHeartbeatsDelay | 500ms | The time when message may be delivered directly (without gossiping) | ||||||||||||||||||||||||
26 | manyHeartbeatsDelay | 30 sec | The maximum time the message may be delivered | ||||||||||||||||||||||||
27 | generatedNetworksCount | 10 | The number of random tolopogies generated for each iteration | ||||||||||||||||||||||||
28 | sentMessageCount | 10 | The number of messages sent (from different peers) for each iteration (The total number of messages per iteration would be [generatedNetworksCount] * [sentMessageCount]) | ||||||||||||||||||||||||
29 | startRandomSeed | 0 | Random seed. With the same random seed exactly the same behaviour is observed | ||||||||||||||||||||||||
30 | |||||||||||||||||||||||||||
31 | |||||||||||||||||||||||||||
32 | Simulation results: | ||||||||||||||||||||||||||
33 | 0-* | The statistics gathered after [zeroHeartbeatsDelay] time passed after message publication | |||||||||||||||||||||||||
34 | N-* | The final statistics (gathered after [manyHeartbeatsDelay] time passed after message publication) | |||||||||||||||||||||||||
35 | |||||||||||||||||||||||||||
36 | *-msgCnt | Single peer message count per one publish | |||||||||||||||||||||||||
37 | *-traffic | Single peer traffic in bytes per one publish | |||||||||||||||||||||||||
38 | *-delivered% | %% of peers received the message | |||||||||||||||||||||||||
39 | *-delay(50%) | Median message delivery delay | |||||||||||||||||||||||||
40 | *-delay(95%) | 95% percentile message delivery delay | |||||||||||||||||||||||||
41 | *-delay(max) | Max message delivery delay | |||||||||||||||||||||||||
42 | |||||||||||||||||||||||||||
43 | |||||||||||||||||||||||||||
44 | |||||||||||||||||||||||||||
45 | |||||||||||||||||||||||||||
46 | |||||||||||||||||||||||||||
47 | |||||||||||||||||||||||||||
48 | |||||||||||||||||||||||||||
49 | |||||||||||||||||||||||||||
50 | |||||||||||||||||||||||||||
51 | |||||||||||||||||||||||||||
52 | |||||||||||||||||||||||||||
53 | |||||||||||||||||||||||||||
54 | |||||||||||||||||||||||||||
55 | |||||||||||||||||||||||||||
56 | |||||||||||||||||||||||||||
57 | |||||||||||||||||||||||||||
58 | |||||||||||||||||||||||||||
59 | |||||||||||||||||||||||||||
60 | |||||||||||||||||||||||||||
61 | |||||||||||||||||||||||||||
62 | |||||||||||||||||||||||||||
63 | |||||||||||||||||||||||||||
64 | |||||||||||||||||||||||||||
65 | |||||||||||||||||||||||||||
66 | |||||||||||||||||||||||||||
67 | |||||||||||||||||||||||||||
68 | |||||||||||||||||||||||||||
69 | |||||||||||||||||||||||||||
70 | |||||||||||||||||||||||||||
71 | |||||||||||||||||||||||||||
72 | |||||||||||||||||||||||||||
73 | |||||||||||||||||||||||||||
74 | |||||||||||||||||||||||||||
75 | |||||||||||||||||||||||||||
76 | |||||||||||||||||||||||||||
77 | |||||||||||||||||||||||||||
78 | |||||||||||||||||||||||||||
79 | |||||||||||||||||||||||||||
80 | |||||||||||||||||||||||||||
81 | |||||||||||||||||||||||||||
82 | |||||||||||||||||||||||||||
83 | |||||||||||||||||||||||||||
84 | |||||||||||||||||||||||||||
85 | |||||||||||||||||||||||||||
86 | |||||||||||||||||||||||||||
87 | |||||||||||||||||||||||||||
88 | |||||||||||||||||||||||||||
89 | |||||||||||||||||||||||||||
90 | |||||||||||||||||||||||||||
91 | |||||||||||||||||||||||||||
92 | |||||||||||||||||||||||||||
93 | |||||||||||||||||||||||||||
94 | |||||||||||||||||||||||||||
95 | |||||||||||||||||||||||||||
96 | |||||||||||||||||||||||||||
97 | |||||||||||||||||||||||||||
98 | |||||||||||||||||||||||||||
99 | |||||||||||||||||||||||||||
100 |