go-bitswap icon indicating copy to clipboard operation
go-bitswap copied to clipboard

Question about Download speed

Open LiMoMoMo opened this issue 7 years ago • 5 comments

node upload bandwidth
A 1Mbps
B 10Mbps

Add the same file(QmS) in A and B, use node C to get the file(ipfs get QmS). The expectation of download speed is 1M/s, but the real download speed is about 200kB/s.

LiMoMoMo avatar Apr 26 '19 08:04 LiMoMoMo

Are your units correct?

  • 1 Mbps = 1 mega-bit per second.
  • 200 kB/s = 1000 kilo-bytes per second.

1 Mbps = 1/8 MB/s = 125kB/s


On the other hand, there's a lot of room for improvement...

Stebalien avatar Apr 26 '19 08:04 Stebalien

Sorry, this is the result of after I change the code. I want to make full use of all the peer's upload bandwidth to download. In this case, the expected Download bandwidth is 11Mbps, but the actual results is smaller than the expectation.

LiMoMoMo avatar Apr 29 '19 03:04 LiMoMoMo

@LiMoMoMo are you fetching a single large block? A combined download speed could not be achieved unless you're requesting multiple blocks at once.

That said, the overall total is concerning.

hannahhoward avatar Apr 30 '19 21:04 hannahhoward

Also @stebalien -- not sure I know exactly how UnixFS will chunk up a large file but maybe there is a limitation in terms of the round tripping for want lists? (especially since we have a want list limit of 32)

hannahhoward avatar Apr 30 '19 21:04 hannahhoward

not sure I know exactly how UnixFS will chunk up a large file but maybe there is a limitation in terms of the round tripping for want lists? (especially since we have a want list limit of 32)

We should be fine there. Assuming a 100ms latency (pretty high), we should get a throughput of 40MiB/s for large files (chunks are 256KiB each). (not good but not terrible).

Unfortunately, this could be related to the fact that get reads the file sequentially (albeit with a bit of prefetching) so bandwidth usage could be bursty.

Stebalien avatar May 01 '19 20:05 Stebalien