FIX: TCP/IP Nagle algorithm for Microsoft Message Queue Server can be disabled

Symptoms

When sending messages with Microsoft Message Queue and TCP/IP as the transport protocol, there may be a delay of approximately 300ms before the packet is sent over the network. This is because the Windows TCP/IP stack uses the Nagle algorithm. The Nagle algorithm improves performance by ensuring TCP/IP packets are used efficiently and preventing the network from being flooded with small TCP/IP packets. Although, in some scenarios it may be advantageous to allow the smaller packets for specific performance reasons. This article describes how to disable the Nagle TCP/IP algorithm when MSMQ is sending messages.

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry

Resolution

Note The following hotfix is not needed for MSMQ 2.0 (Windows 2000) or MSMQ 3.0 (Windows XP and Windows 2003). However, the registry value discussed in the "More Information" section of this article will will still need to be added.

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:

Date Time Version Size File name Platform
-------------------------------------------------------------
6/22/1999 1:34 PM 1.00.0294 481,552 MQQM.DLL x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This bug was corrected in Windows NT 4.0 Service Pack 6.

More Information

The Nagle TCP/IP Algorithm

The Nagle TCP/IP algorithm was designed to avoid problems with small packets, called tinygrams, on slow networks. The algorithm says that a TCP/IP connection can have only one outstanding small segment that has not yet been acknowledged. The definition of "small" varies but usually it is defined as "less than the segment size", which on ethernet is about 1500 bytes.

Manually Disabling the Nagle Algorithm

You can disable the Nagle algorithm by modifying the following registry setting and using the instructions in the "Activating the Modifications" section.

  1. Under the subtree HKEY_LOCAL_MACHINE find the following key:

    \Software\Microsoft\MSMQ\Parameters
  2. Choose Add Key from the Edit menu and use the following information:

    Value Name: TcpNoDelay
    DWord: 1

Activating the Modifications

The Queue Manager must be stopped and restarted after the registry changes have been made. This can be accomplished by stopping and starting the Microsoft Message Queue Service from the services control panel.

References

Note The Nagle algorithm is defined in TCP/IP RFC 896.
Propriedades

ID do Artigo: 235624 - Última Revisão: 23 de fev de 2007 - Revisão: 1

Comentários