cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performance and Nagle algorithm

From: Rick Jones <raj_at_tardy.cup.hp.com>
Date: Thu, 27 Mar 2003 10:54:02 -0800 (PST)

> I was doing some testing with GETs of https:// urls with libcurl under
> win32. I noticed that the Nagle algorithm gets triggered on every
> request leading to a 200ms response time. Turning off Nagle
> (setsockopt(,,TCP_NODELAY,,)) reduces the time to around 15 ms. THis is
> a big improvement.
 
Was this on data coming-back from the server, or in the sending of the
GET itself? I'm guessing it was in the sending of the request to the
server in the first place. Can you provide the packet trace?
 
> Any thoughts?
 
Typically, if disabling Nagle improves throughput for an HTTP*
transaction, it suggests that logically-associated data (ie the
request or the response) is being given to the transport in separate
send calls. Plusungood. The "proper" fix is to present the logically
associated data to the transport at the same time - say through
something akin to writev() if the data is in separate buffers.
 
rick jones
 
The discussion gets a bit more complicated once we are talking about
_pipelined_ requests (versus persistent), but as I recall, libcurl
isn't doing pipelined just yet.

-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
Received on 2003-03-27