Welcome!

Big Data Journal Authors: Liz McMillan, Kevin Benedict, Pat Romanski, Michael Bushong, Elizabeth White

Related Topics: SOA & WOA, Java, Linux, AJAX & REA, Cloud Expo, Big Data Journal

SOA & WOA: Article

Understanding Application Performance on the Network | Part 6

The Nagle Algorithm

In Part V, we discussed processing delays caused by "slow" client and server nodes. In Part VI, we'll discuss the Nagle algorithm, a behavior that can have a devastating impact on performance and, in many ways, appear to be a processing delay.

Common TCP ACK Timing
Beyond being important for (reasonably) accurate packet flow diagrams, understanding "normal" TCP ACK timing can help in the effective diagnosis of certain types of performance problems. These include those introduced by the Nagle algorithm, which we will discuss here, and application windowing, to be discussed in Part VII.

A slightly simplified but useful rule of thumb is as follows:

A receiving node will:

  • Acknowledge every second packet immediately
  • Acknowledge a single packet if the Delayed ACK timer expires before a second packet arrives

The Delayed ACK timer typically defaults to 200 milliseconds, at least on Microsoft platforms.

While this behavior is quite common, you may encounter differences; for example, changing the ACK frequency to every packet is an approach to circumventing certain problems, while shorter Delayed ACK timers may be observed in non-Microsoft environments.

ACK every second packet, or a single packet after the Delayed ACK timer expires

The Nagle Algorithm
The Nagle algorithm was designed to help reduce network overhead by delaying the transmission of a small packet (i.e., <MSS) until all previously transmitted packets have been acknowledged. The goal was to prevent a node from transmitting many small packets if the application delivers data to the socket rather slowly. The usefulness of the algorithm and the frequency with which it is applied have both diminished dramatically; however, you may still encounter it, as the option still exists in most environments.

To begin to understand the impact of the Nagle algorithm, consider a request or reply flow; chances are, the size of the payload in the flow is not an exact multiple of the MSS. Therefore, the last packet of the flow will be smaller than the MSS. With Nagle enabled, this last packet will not be transmitted until the previous (penultimate) packet has been acknowledged. In the best case, the penultimate packet represents an even-numbered packet in the flow, triggering an immediate acknowledgement from the receiver which in turn "releases" the final small packet. In this case, the Nagle penalty is equal to one network round-trip for the entire flow. Should the penultimate packet be an odd-numbered packet, it will not be acknowledged by the receiver until the Delayed ACK timer expires; the penalty becomes one network round-trip plus approximately 200 milliseconds.

The HTTP reply includes two data packets; the last packet is not sent until the earlier packet has been acknowledged. The Delayed ACK timer adds about 200 milliseconds to the transmission of the reply.

For more network tips click here for the full article

More Stories By Gary Kaiser

Gary Kaiser is a Subject Matter Expert in Network Performance Analysis at Compuware APM. He has global field enablement responsibilities for performance monitoring and analysis solutions embracing emerging and strategic technologies, including WAN optimization, thin client infrastructures, network forensics, and a unique performance management maturity methodology. He is also a co-inventor of multiple analysis features, and continues to champion the value of software-enabled expert network analysis.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Latest Stories from Big Data Journal
Cisco on Wedesday announced its intent to acquire privately held Metacloud. Based in Pasadena, Calif., Metacloud deploys and operates private clouds for global organizations with a unique OpenStack-as-a-Service model that delivers and remotely operates production-ready private clouds in a customer's data center. Metacloud's OpenStack-based cloud platform will accelerate Cisco's strategy to build the world's largest global Intercloud, a network of clouds, together with key partners to address cu...
Technology is enabling a new approach to collecting and using data. This approach, commonly referred to as the “Internet of Things” (IoT), enables businesses to use real-time data from all sorts of things including machines, devices and sensors to make better decisions, improve customer service, and lower the risk in the creation of new revenue opportunities. In his session at Internet of @ThingsExpo, Dave Wagstaff, Vice President and Chief Architect at BSQUARE Corporation, will discuss the real...
I write and study often on the subject of digital transformation - the digital transformation of industries, markets, products, business models, etc. In brief, digital transformation is about the impact that collected and analyzed data can have when used to enhance business processes and workflows. If Amazon knows your preferences for particular books and films based upon captured data, then they can apply analytics to predict related books and films that you may like. This improves sales. T...
IoT is still a vague buzzword for many people. In his session at Internet of @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, will discuss the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. The presentation will also discuss how IoT is perceived by investors and how venture capitalist access this space. Other topics to discuss are barriers to success, what is n...
When one expects instantaneous response from video generated on the internet, lots of invisible problems have to be overcome. In his session at 6th Big Data Expo®, Tom Paquin, EVP and Chief Technology Officer at OnLive, to discuss how to overcome these problems. A Silicon Valley veteran, Tom Paquin provides vision, expertise and leadership to the technology research and development effort at OnLive as EVP and Chief Technology Officer. With more than 20 years of management experience at lead...
BlueData aims to “democratize Big Data” with its launch of EPIC Enterprise, which it calls “the industry’s first Big Data software to enable enterprises to create a self-service cloud experience on premise.” This self-service private cloud allows enterprises to create 100-node Hadoop and Spark clusters in less than 10 minutes. The company is also offering a Community Edition via free download. We had a few questions for BlueData CEO Kumar Sreekanti about all this, and here's what he had to s...
Labor market analytics firm Wanted Analytics recently assessed the market for technology professionals and found that demand for people with proficient levels of Hadoop expertise had skyrocketed by around 33% since last year – it is true, Hadoop is hard technology to master and the labor market is not exactly flooded with an over-abundance of skilled practitioners. Hadoop has been called a foundational technology, rather than ‘just’ a database by some commentators – this almost pushes it towards...
The cloud provides an easy onramp to building and deploying Big Data solutions. Transitioning from initial deployment to large-scale, highly performant operations may not be as easy. In his session at 15th Cloud Expo, Harold Hannon, Sr. Software Architect at SoftLayer, will discuss the benefits, weaknesses, and performance characteristics of public and bare metal cloud deployments that can help you make the right decisions.
Where historically app development would require developers to manage device functionality, application environment and application logic, today new platforms are emerging that are IoT focused and arm developers with cloud based connectivity and communications, development, monitoring, management and analytics tools. In her session at Internet of @ThingsExpo, Seema Jethani, Director of Product Management at Basho Technologies, will explore how to rapidly prototype using IoT cloud platforms and c...
Amazon, Google and Facebook are household names in part because of their mastery of Big Data. But what about organizations without billions of dollars to spend on Big Data tools - how can they extract value from their data? Ion Stoica is co-founder and CEO of Databricks, a company working to revolutionize Big Data analysis through the Apache Spark platform. He also serves as a professor of computer science at the University of California, Berkeley. Ion previously co-founded Conviva to commercial...