nWaku Version: v0.34.0
branch add-discv5-bw-metric
The following report reports the bandwidth usage of Discv5 in nWaku. For this purpose, we decided to compare the following scenarios:
This will allow us to see several situations. Point number 1 will give us standard information about discv5 usage. Adding points 2 and 3 will let us see if traffic makes an impact on discv5.
On top of this, there are 2 ways of gathering the data. The first one is getting all data since the beginning of the simulation. The second one is waiting until the mesh is healthy. This is important because the message injection starts once the full mesh is healthy.
We can see the results in the bottom figures.
Results with complete data
Results with only data when the mesh is healthy
Despite being the same simulation, depending on where the data is gathered varies the result. In libp2p-in
metric when there is message injection, the median value that we obtain is lower if we get the full data of the simulation. This is caused by the fact that the injection happens when all nodes are healthy. This adds more time for gathering data, thus when averaging the bandwidth for each node, the values are lower, because some nodes are idle waiting for the rest to reach a healthy state. Also, it is taking into account the bandwidth drop when the simulation is stopped.
Similarly, the discv5 bandwidth usage is lower for the same reason, takes into account when not all nodes are ready and some of them are still not reporting data, and also when the simulation is stopped.
For the previous reasons and in order to obtain “stable data”, we always select the data from the plots once the message injection reached a stable state.
Nonetheless, looks like the impact of message injection in the discovery makes little to no effect. The bandwidth usage for discv5-in
is fairly stable, whereas discv5-out
can vary a lot between nodes.
We can also check if the number of nodes makes an impact on the discv5 bandwidth usage. For this, we will do another batch of simulations. This time, we will use 100, 200, 400 and 800 nWaku nodes + 3 bootstrap nodes each time. We will not use message injection, and we will use the entire data of the simulation. Each one will take 10 minutes.