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 write system calls, thus fewer TCP packets #3

Merged
merged 1 commit into from
Aug 22, 2013

Conversation

jeffallen
Copy link

Do a bit more copying around in user space before handing off
the data to the kernel, so that TCP sends fewer packets.

Before this change, one connect, publish and disconnect
was 19 packets. After this change, it is 14 packets.
Ethernet/IP/TCP overhead is about 66 bytes. So with this
change, we use 73% of the bandwidth as before
(14_66/19_66 = 0.73).

Do a bit more copying around in user space before handing off
the data to the kernel, so that

Before this change, one connect, publish and disconnect
was 19 packets. After this change, it is 14 packets.
Ethernet/IP/TCP overhead is about 66 bytes. So with this
change, we use 73% of the bandwidth as before
(14*66/19*66 = 0.73).
@huin
Copy link
Owner

huin commented Aug 22, 2013

Thanks! Looks good to me. I trust you've run the unit tests.

huin pushed a commit that referenced this pull request Aug 22, 2013
Reduce write system calls, thus fewer TCP packets
@huin huin merged commit 460c923 into huin:master Aug 22, 2013
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.

2 participants