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

Reduce overhead of every single order/sync frame by 162/222 bytes #16468

Merged
merged 1 commit into from May 4, 2019

Conversation

jrb0001
Copy link
Contributor

@jrb0001 jrb0001 commented Apr 29, 2019

4 send syscalls combined with TCP_NODELAY means that the network stack has to emit 4 frames per OpenRA frame. The overhead of Ethernet+IPv4+TCP is at least 54 bytes per frame and Ethernet+IPv6+TCP is at least 74 bytes per frame.

@pchote
Copy link
Member

pchote commented Apr 29, 2019

Context from IRC: Each Connection.Send call would be immediately flushed (because of the nodelay) and sent as its own TCP frame. Using the MemoryStream to create a single blob for each packet means that we only pay the TCP overhead once.

@reaperrr reaperrr merged commit b774556 into OpenRA:bleed May 4, 2019
@jrb0001 jrb0001 deleted the net-overhead branch May 4, 2019 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants