How-to increase UDP buffers under Windows OS

A common issue for people using Wowza when taking in MPEG-TS streams are that the default OS buffer sizes are too small.

To check your buffer sizes you will need to use the regedit tool. Please be aware if you change the values this may
cause system problems and you do so at entirely your own risk.

Navigate to

HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services
\Afd
\Parameters

You may be able to see

DefaultReceiveWindow

however if not it does have a default of 4096, 8192 or possibly another value.

This is a REG_DWORD and a basic calculation that can be done is

Bandwidth (kbps) * 1000 / 8

So if you know your streams will be 1Mbp/s inbound then you can do

1000 * 1000 / 8 = 125000

You do also need to take into account your MSS. A common MSS is 1452 and the window should be a factor of this so

125000 / 1452 = 86.08

So we change the resulting window up or down, lets go up therefore 1452 * 87 = 126324

This is a PER CONNECTION setting so it is not the speed of your interface. A common setting would be

1250000

1250000 / 1452 = 860.88 therefore 1452 * 861 = 1250172

This is for a 10mbp/s inbound per stream setting.


Comments are closed.