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

simple speed boost for legacy mode #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Masaq-
Copy link
Contributor

@Masaq- Masaq- commented May 29, 2016

Throughput is increased in legacy mode by dropping packets if the client is not ready to send immediately. Upstream packets must conform to the ping-pong traffic pattern or be dropped, and TCP recovers gracefully from intentional packet loss by sending some segments out of order. This is tremendously beneficial on Wi-Fi, where latency is variable, if the only available DNS server will only tolerate legacy mode. Personally I have seen this simple change double my download speed.

@Masaq-
Copy link
Contributor Author

Masaq- commented Sep 30, 2016

Why this patch works:

Performance is strongly coupled to low ping times, as iodine requires confirmation for every data fragment before moving on to the next.

Without this patch, throughput in bytes per second is approximately
(fragment size)*(1000/(average ping))

With this patch, throughput in bytes per second is approximately
(fragment size)*(1000/(minimum ping))

Without this patch, the client queues packets for quick transmission during periods of low ping and delayed transmission during periods of high ping.

With this patch, the client discards packets during periods of high ping, eliminating delay in favor of packet loss, and resulting in a bias toward transmission during periods of low ping.

Unless ping time is constant, then average ping and minimum ping are the same, and no change occurs.

I see double speed with this patch because my average ping is double my minimum ping.

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

Successfully merging this pull request may close these issues.

None yet

1 participant