directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bennett" <timothy.eugene.benn...@gmail.com>
Subject [PERFORMANCE] Disabling Nagle Algorithm improves performance
Date Mon, 19 Jun 2006 16:39:43 GMT
Alex Karasulu is on his way to the Caribbean for a well-deserved
vacation...  Meanwhile, he asked me to post this message to the dev lists at
directory and mina:
===========================

The current problem where Directory is exhibiting an upper limit of 25
requests/sec on an individual client connection is due to a 40 msec delay
imposed by Nagle's algorithm (
http://en.wikipedia.org/wiki/Nagle%27s_algorithm).

The server's actual upper limit is currently measured at approximately 1,300
to 1,500 requests/sec requires, which requires multiple connected clients to
reach this limit.

>From the Wikipedia entry:

"This algorithm interacts badly with TCP delayed acknowledgements, a feature
introduced into TCP at roughly the same time in the early 1980s, but by a
different group. With both algorithms enabled, applications which do two
successive writes to a TCP connection, followed by a read, experience a
constant delay of up to 500 milliseconds, the "ACK delay". For this reason,
TCP implementations usually provide applications with an interface to
disable the Nagle algorithm."

MINA has a way to disable Nagle's algorithm by configuring the socket option
to TCP_NODELAY.  Perhaps some others can pick up the discussion and carry
on...

-- 
timothy

Mime
View raw message