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

This does lead to huge IP fragmentation #14

Open
brunchboy opened this issue Nov 11, 2018 · 1 comment
Open

This does lead to huge IP fragmentation #14

brunchboy opened this issue Nov 11, 2018 · 1 comment

Comments

@brunchboy
Copy link

# this eventually leads to ip fragmentation, but increases read speed by ~x4
self.download_chunk_size = 60000

Given that the Ethernet MTU is 1,500 bytes, this causes the read response to be split across 41 packets, as you can see if you look at a wireshark capture of a file being downloaded by this code. If any one of those packets gets lost, the entire request and response needs to be retransmitted.

I found I got much better results using the same read size as the players themselves (2,048 bytes), and configuring the UDP RPC client to have a timeout of 250 milliseconds, with an exponential backoff. What is your timeout?

@flesniak
Copy link
Owner

I will try to look into this and test my download speeds with different chunk sizes. I am currently using a timeout of one second, which is quite probably too much.

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