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

The TCP_NODELAY is not set at the accepted socket #377

Open
GoogleCodeExporter opened this issue Jul 15, 2015 · 0 comments
Open

The TCP_NODELAY is not set at the accepted socket #377

GoogleCodeExporter opened this issue Jul 15, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

The TCP_NODELAY is only set at the listening socket, and not set at the 
accepted socket. In Linux machine I tested, the TCP_NODELAY on listening socket 
cannot be inherited by the accepted socket.

There is a serious performance problem when TCP_NODELAY is not set on memcached 
server and when the client machine has delayed ack enabled (like default in 
windows, the delayed ACK can be 200ms)

A test case:
client on windows get an item from a linux memcached server. The response item 
size should be >1400 and <2800 (including all parameters)
1. the first 1400 bytes will be sent immediately. and the remaining bytes are 
kept in buffer without sending
2. windows client received the first 1400 bytes and the delay acks take effect.
3. widows client wait 200ms when the delay ack time out happens. Then the ack 
is sent.
4. memcached receives the ack and then the remaining bytes is sent
5. windows client receives the remainning bytes

Result:
The windows client got the item with a delay of 200ms unnecessarily. 

Original issue reported on code.google.com by rone...@gmail.com on 12 Sep 2014 at 8:48

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

No branches or pull requests

1 participant