Topics

What is buffer_count ? #spyserver

Святослав З
 

Hello!
Please tell me what does the "buffer_count" parameter in the spyserver config mean?
If the buffer is quite clear in milliseconds, then what does it read buffer_count?
Is this the number of buffers? For example, if buffer_size_ms = 150 and buffer_count = 20, then the total delay is 150 * 20 = 3000ms?

prog
 

On Sat, Nov 24, 2018 at 03:43 PM, Святослав З wrote:
Hello!
Please tell me what does the "buffer_count" parameter in the spyserver config mean?
If the buffer is quite clear in milliseconds, then what does it read buffer_count?
Is this the number of buffers? For example, if buffer_size_ms = 150 and buffer_count = 20, then the total delay is 150 * 20 = 3000ms?
No. It's not that straightforward. The latency (what you call delay) of streaming is function of many, many other factors.
The question is legitimate, but since this mailing list is not intended to be a course of computer science, I will skip the theoretical part.
What you should retain is that buffer_size_ms * buffer_count >= round trip in millisecond returned by spyserver_ping utility. For public Internet servers, the defaults work just fine, even over satellite connection (Yes, I tested that). A total of 3000ms buffering will only cause 3000ms of latency if the connection breaks in a severe way.
In general, setting a bigger buffer will not systematically translate into more latency. The system is much smarter than that, and it will do its best to keep the latency as low as possible until your network breaks completely, then it starts skipping whole buffers until there is enough room to enqueue the next buffer.