Moka5
Moka5


Slow Downloads over a High-Latency Network with a 4.0 Image Store on Windows Server 2008   « Go Back

Summary

4.0 Image Stores can experience slow downloads when running on Windows Server 2008. This article describes a workaround.

Applies To

  • Moka5 4.0 - 4.0.4 Image Store
  • Windows Server 2008

Resolved In

  • Moka5 4.1.x Image Store
  • Moka5 4.0.5 Image Store

Note: This issue is resolved in Moka5 4.1. The default buffer size on Windows 2008 R2 changed from 8KB to 128KB, and from 64KB to 128KB on Windows 2012.

These values should be sufficient to make image stores serve files efficiently in most server/network configurations. If you would still like to change the buffer size, you can use the procedure outlined below.

Description

In 4.0, the Image Store started using APR (Apache Portable Runtime) as the underlying data-serving mechanism. APR is significantly more CPU efficient than NIO (the mechanism used in 3.19 or below).

As a result of using APR, the Image Store now uses the OS-defined value of TCP buffer-size. This value determines the amount of data sent by the server to client in one packet. In Windows Server 2008, the default value of this setting is 8KB. This value can become a bottleneck on a high-bandwidth, high-latency network, especially with a small number of clients. In these circumstances, the server is not able to take full advantage of the available bandwidth. Instead, it has to wait for each packet to be acknowledged by the client before it sends the next one.

The fix is to increase this TCP buffer-size value by adding new registry entries. These entries set the buffer size to 64KB.

No change is required on Windows Server 2012, where the default value is already 64KB.

Adding Registry Entries

WARNING: Using the Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall your OS. Moka5 cannot guarantee that any problems resulting from the use of Registry Editor can be solved.

Use this tool at your own risk.

Add the following registry entries:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\AFD\Parameters]
"DefaultReceiveWindow"=65536
"DefaultSendWindow"=65536

Both values are DWORD decimal.

Reboot your OS for this setting to take effect.