protocol / beyond-bitswap

Other
34 stars 9 forks source link

Testing compression bandwidth savings #14

Open adlrocha opened 3 years ago

adlrocha commented 3 years ago

Be careful when testing the bandwidth savings of using compression. The testbed currently tracks the bandwidth usage through the IPFS node Reporter, but the bandwidth counter of the Reporter tracks the bandiwdth use at a stream level. In our current stack, compression comes after the stream muxer, so this metric would account for protocol bandwidth use accurately, but it is not useful to track total bandwidth use.

https://github.com/adlrocha/beyond-bitswap/blob/feat/compression/testbed/utils/ipfs.go#L606

Solving this issue depends on the following one from libp2p: https://github.com/libp2p/go-libp2p/issues/1008

In the meantime you can use tools such as https://github.com/raboof/nethogs to measure bandwidth savings.

adlrocha commented 3 years ago

Check: https://github.com/adlrocha/beyond-bitswap/pull/16