Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note on improving download speed #1

Open
sambacha opened this issue Apr 12, 2022 · 4 comments
Open

Note on improving download speed #1

sambacha opened this issue Apr 12, 2022 · 4 comments

Comments

@sambacha
Copy link

IPFS uses QUIC transfers. These connections can be limited by the size of the UDP receive buffer. This buffer holds packets that have been received by the kernel, but not yet read by the application (quic-go is what IPFS uses in this case). Once this buffer fills up, the kernel will drop any new incoming packet.

ensure you have configured

sysctl -w net.core.rmem_max=2500000

default is 208 kiB
you want: 2048 kiB

see https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size

@wmitsuda
Copy link
Member

Did you notice significant improvement on time spent to download the sourcify repo? Just curious.

I'm on mac, it seems the default in my machine is 8MB:

$ sysctl kern.ipc.maxsockbuf
kern.ipc.maxsockbuf: 8388608

@sambacha
Copy link
Author

Will have to benchmark to get specifics, OSX configuration is recommended to have about 30-35% more than what is needed per the documentation provided above

Benchmarking would be interesting, maybe will create a dummy repo with a small data set that way its reproducible, wdyt?

@wmitsuda
Copy link
Member

Would be good, I don't have a linux machine so I can't reproduce, but if this is confirmed to improve download speed we can add this recommendation on build instructions, the raw sourcify repo is quite big right now (~11GB) and increasing.

@sambacha
Copy link
Author

Would be good, I don't have a linux machine so I can't reproduce, but if this is confirmed to improve download speed we can add this recommendation on build instructions, the raw sourcify repo is quite big right now (~11GB) and increasing.

I found this very relevant repo: https://github.com/ConsenSys/ipfs-lookup-measurement
with latency for content retrieval graphed here

Also just to clarify, not using the flat store (using badger) and pub sub, any other important flags?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants