Le vendredi 15 mai 2015, 22:06:02 Luca Barbato a écrit :
> On 15/05/15 20:39, Rémi Denis-Courmont wrote:
> > Le 2015-05-15 17:18, Luca Barbato a écrit :
> >> Make it as large as 5 times the expected maximum udp packet.
> > 
> > Increasing the buffer size may be a good idea on Windows. But setting a
> > buffer size is usually a bad idea on Linux in my experience (the kernel
> > knows better).
> 
> You need that if you are receiving a full hd video over udp+mpegts and
> that's getting the standard use case.

No. You need that if your software has performance problems and fails to read 
incoming datagrams for too long. But then again, that being the case, your 
application will sooner or later exceed the kernel-imposed security limits.

Of course, the kernel buffers need to be large enough to cope with packet 
bursts, but that is not directly related to the bit rate.

If you do not have enough CPU to process incoming packets, you are screwed. If 
you do, but the application is making poor use of it, then you should fix the 
application, not the kernel settings. FWIW, VLC reads UDP from a dedicated 
thread, maintaining potentially large buffer in *user* space.

-- 
Rémi Denis-Courmont
http://www.remlab.net/

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to