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.
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.