about lowlatency buffer size

Hello

here is my recent experience regarding tuning of buffersize for low latency over rtmp:

i’m livingin thailand, and my servers are based in france. so my personnal connection is not specially efficient.

after a few tests, here is what gave me the best results:

<ReceiveBufferSize>65000</ReceiveBufferSize>
                                        <ReadBufferSize>32000</ReadBufferSize>
                                        <SendBufferSize>32000</SendBufferSize>

i suppose that the ReceiveBufferSize is corresponding to the incoming streams (confirm ?)

if i put

<ReceiveBufferSize>32000</ReceiveBufferSize>
                                        <ReadBufferSize>32000</ReadBufferSize>
                                        <SendBufferSize>32000</SendBufferSize>

the framerate on the playing side is less important…does it make sense to you ?

or said differently, in a “one2many” configuration, does it make sense to have a bigger buffer for the incoming stream, in order to add stability and avoid micro-cuts ?

Hi,

The lower the buffersize the shorter the latency but as you have seen it will cause any network variations to be more ‘visible’. Nominally for longer distance connections you do need a larger buffer simply due to variable latency. I would recommend setting to 64000 or even 128000 and live will a little more stability.

Andrew.

ok thanks for your reply

does a higher buffer size increase server load ?

Hello there,

Actually, the opposite would be true, lower buffer sizes increase the server load.

The ReceiveBufferSize and SendBufferSize control the size of bytes of the socket buffers in the OS. The theory is that if these buffers are too large then it will also introduce latency since more bytes will be held by the OS before they are sent to Wowza. So smaller sized buffers are best for lower latency streaming. This probably increases the CPU load on a per-socket basis. That is why we suggest larger buffers for higher latency streaming (to decrease CPU load).

This note taken from the “How to achieve the lowest latency from capture to playback” guide:

With this setting in place, the Wowza media server’s per-stream CPU load will increase. So you won’t be able to handle as many concurrent sessions per server.

Kind regards,

Salvadore