Server Does Not Use All Bandwidth Available When Streaming Files with Bit Rates over 100 Kbps

ID: Q235257

This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release.
The information in this article applies to:

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.

SYMPTOMS

A Windows Media Server may not use all of the available bandwidth for a network card. Stream errors may start to occur even though there is no disk transfer problem and there are still network card bandwidth and CPU cycles available. If you use a 100-megabit NIC, for example, it should be possible to have almost 1000 100-kilobit streams simultaneously, but this number is actually limited to a little more than 600. The rest of the bandwidth cannot be used.


CAUSE

When a Windows Media Server uses UDP to stream, ASF files that are encoded at bit rates equal to or greater than 100 kilobytes per second (Kbps), the size of the transmitted packets is usually greater than 1024 bytes. When the packet size is less than or equal to 1024 bytes, the data is sent directly. If it is above 1024 bytes, the data is locked and buffered and waits until TCP/IP is done sending the data. In the second case, the number of context switches increases enormously and prevents the server from using all the bandwidth available.


WORKAROUND

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).


To resolve this problem, do the following:

  1. Start Registry Editor (Regedt32.exe).


  2. Locate the following key in the registry:
    HKLM\System\CurrentControlSet\Services\Afd\Parameters


  3. On the Edit menu, click Add Value, and then add the following registry value:
    Value Name: FastSendDatagramThreshold
    Data Type: REG_DWORD
    Value: 1500


  4. Quit Registry Editor.


This value contains the new threshold (in bytes) at which Winsock changes its behavior regarding UDP packets. Values such as 1500 or 2048 should help to dramatically increase the amount of usable bandwidth for streaming ASF files with 100 kilobits or greater bit rates. For higher bit rates, it may be necessary to set higher values for this key. Because it is possible that side effects may occur, this change should be carefully monitored.


MORE INFORMATION

More information about the FastSendDatagramThreshold key and other TCP/IP tuning mechanisms can be found in the following document:

TCP/IP Implementation Details

Additional query words: netshow


Keywords          : 
Version           : :4.0
Platform          : 
Issue type        : kbprb 

Last Reviewed: July 2, 1999