Page 1 of 1

OpenVPN Buffers

Posted: Thu Jul 12, 2018 6:43 pm
by MagikMark
Hi Philip!

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?

Posted: Fri Jul 13, 2018 11:17 am
by Philip
Yes, they are similar to the TCP Window in that they are buffers. What works best for you would depend on your particular VPN provider, however. It is not an exact science, since it depends on where the bottleneck of the connection is, what buffers the nodes would tolerate (keep in their queue and forward, vs. discarding), etc. I would increase them to about twice their default value and see if it improves the connection. I would back off and reduce them if you start experiencing packet loss/slowdowns. If a router/node on the path gets overwhelmed with a large buffer it will start dropping packets, which is counter-productive.

Posted: Fri Jul 13, 2018 6:06 pm
by MagikMark
Can we use the formula used in this site when getting tcpreceivedwindow?