disable Nagle's algorithm for accepted clients
Normally, disabling Nagle's algorithm would have little effect
on typical MogileFS traffic:
< read one request from client
- process request in queryworker
> write one response to client
< read one request from client
- process request in queryworker
> write one response to client
< read one request from client
- process request in queryworker
> write one response to client
...
However, in certain cases, clients may pipeline requests (and
sort responses on the client side). This causes tracker traffic
to end up like this:
< read multiple requests from client
- process requests in parallel on multiple queryworkers
> write one response to client
> write one response to client
> write one response to client
...
Since Nagle's algorithm waits for an ACK from each response the
server writes before sending the next response, it limits the
rate at which the client can receive responses.
Informal testing over loopback running the "file_info" command
on two batches of 1000 keys each (2000 keys total) consistently
reveals a small, ~20-60ms reduction (580-600ms -> 540-580ms) on
a somewhat active machine with four queryworkers (and four
cores).
Like SO_KEEPALIVE, TCP_NODELAY is inherited from the listener by
accepted sockets in every system I've checked, so there's no
additional overhead in userspace when accepting new clients.