OpenVPN Buffers

Get help and discuss anything related to tweaking your internet connection, as well as the different tools and registry patches on the site. TCP Optimizer settings and Analyzer results should be posted here.
Post Reply
canoeingmacaroni
New Member
Posts: 1
Joined: Wed Jun 05, 2024 10:53 pm

OpenVPN Buffers

Post 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?
User avatar
Philip
SG VIP
Posts: 11557
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Re: OpenVPN Buffers

Post 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.
melodan39
New Member
Posts: 1
Joined: Thu Jun 27, 2024 4:31 am

Re: OpenVPN Buffers

Post by melodan39 »

Thanks for that info Philip! :)
Post Reply