Sunday, January 27, 2013

Nagle's Algorithm...

I found this post concerning TCP Nagle algorithm causing inefficient network performance within C#/.NET Web Applications  http://romikoderbynew.com/tag/nagle-algorithm/  and wanted to pass it along.  Nagle's Algorithm was developed to concatenate small, interactive data into single datagrams to increase efficiency in older interactive programs like Telnet.  In many cases it is still used by default without knowledge of the socket programmer.

One of the cool things I wanted to point out about the original post was the lengths the developers went to optimize performance.  Sadly this usually isn't the case.  As a Network Performance Analyst I am very aware of Nagle's, and other "optimizations" in the TCP stack as well as options that can be utilized in socket programming to tune TCP for certain types of applications.  Not always the case in the development world.  These guys really went to great lengths and utilized several tools to get to the bottom of their web app performance issues. Kudos!

TCP Congestion avoidance, buffer bloat, Nagle's ....  these are fascinating topics for the Performance Analyst but really need to be socialized more broadly to the IT world and specifically to developers. Not really intending to pick on developers but generally speaking they are trying to produce "working" code on schedule - not necessarily network optimized code.

Here are a couple of the tools they utilized.  The links are listed in the article as well...
dotTRACE
http://www.jetbrains.com/profiler/

Apachebench
http://httpd.apache.org/docs/2.2/programs/ab.html

Fiddler
http://www.fiddler2.com/fiddler2/





No comments: