Page 1 of 1

OpenVPN Buffers

Posted: Wed Jun 05, 2024 10:57 pm
by canoeingmacaroni
Hi!

OpenVPN has parameters called "sndbuf" and "rcdbuf". They are actually buffers. Should this be considered analogous to Windows' "Tcpreceive and TCPsend Window"?

If so is there a way to scientifically compute their optimum size?

Re: OpenVPN Buffers

Posted: Thu Jun 06, 2024 5:11 am
by Philip
Yes, they can be considered similar to other TCP buffers.

As with other buffers, it depends on the speed of the connection, higher transfer speeds, require larger buffers to avoid interruptions, especially when there is a latency spike. It is problematic to strike a proper balance for every type of connection, but you can use our "BDP Calculator" (bandwidth-delay calculator) to determine how large of a buffer you actually need to achieve certain speed at some latency. You can assume, for example that within the continental US, your latency will stay within 100ms. So to achieve 10 Mbps throughput at 100ms, you need like 125k buffer.
BDP calculator: https://www.speedguide.net/bdp.php

You can safely double that estimate, but, downside is that if you use "too large" of a buffer, data may remain stale at some node in the middle of the connection. If that node is overloaded, it may start dropping some packets. If routers on the line start dropping packets, you will experience drop in throughput and other issues.

I hope this helps.

Re: OpenVPN Buffers

Posted: Thu Jun 27, 2024 4:34 am
by melodan39
Thanks for that info Philip! :)