FIX: TCP/IP Nagle Algorithm for Microsoft Message Queue Server Can be Disabled

ID: Q235624


The information in this article applies to:
  • Microsoft Message Queue Server version 1.0


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 editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
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 this to be a problem in the Microsoft products listed at the beginning of this article.

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
          Data Type:  REG_SZ
          String:     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.

Additional query words: msmq delay tcp ip nagle

Keywords : kbMSMQ kbMSMQ100 kbMSMQ100bug kbMSMQ100fix kbDSupport
Version : winnt:1.0
Platform : winnt
Issue type : kbbug


Last Reviewed: October 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.