Project

General

Profile

Todo #7507

Investigate and potentially add options for fast-io and sndbuf/rcvbuf tweaks to OpenVPN

Added by Jim Pingle about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
OpenVPN
Target version:
Start date:
05/02/2017
Due date:
% Done:

100%

Estimated time:

Description

Feedback from users suggests there is a great speed improvement to be had by using the following settings on certain platforms:

fast-io
sndbuf 524288
rcvbuf 524288

fast-io is OK to use on FreeBSD, but is UDP-only so it would need to only be added then, and have the option hidden when using TCP modes.

       --fast-io
              (Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a
              call to poll/epoll/select prior to the write operation.  The
              purpose of such a call would normally be to block until the
              device or socket is ready to accept the write.  Such blocking is
              unnecessary on some platforms which don't support write blocking
              on UDP sockets or TUN/TAP devices.  In such cases, one can
              optimize the event loop by avoiding the poll/epoll/select call,
              improving CPU efficiency by 5% to 10%.

              This option can only be used on non-Windows systems, when
              --proto udp is specified, and when --shaper is NOT specified.

The buffer size above, 524288, appears to have been chosen either arbitrarily or based on settings found elsewhere. We could offer a drop-down based on the value of net.inet.tcp.sendbuf_max & net.inet.tcp.recvbuf_max or a free-form field with suggestions.

       --sndbuf size
              Set the TCP/UDP socket send buffer size.  Defaults to operation
              system default.

       --rcvbuf size
              Set the TCP/UDP socket receive buffer size.  Defaults to
              operation system default.

Associated revisions

Revision 2df5d9ee (diff)
Added by Jim Pingle about 2 years ago

Add OpenVPN GUI option for "fast-io" to clients and servers. Ticket #7507
Only compatible with UDP modes, and also not compatible with "shaper".

Revision 7618a842 (diff)
Added by Jim Pingle about 2 years ago

Add OpenVPN GUI Option for "sndbuf" and "rcvbuf", using the same value for both. Fixes #7507

History

#1 Updated by Jim Pingle about 2 years ago

  • Description updated (diff)

#2 Updated by Jim Pingle about 2 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#3 Updated by Jim Pingle about 2 years ago

  • Target version changed from 2.4.1 to 2.4.0

This seemed safe enough and reports of significant speed increases, especially on SG-1000, made this desirable for 2.4. It's all in now. Local testing shows it being good, but it could use wider testing.

#4 Updated by Bipin Chandra about 2 years ago

we were already using those params as advanced settings till date and now that it appears in GUI it works well, can be closed

#5 Updated by Jim Pingle about 2 years ago

  • Status changed from Feedback to Resolved

Thanks for testing!

Also available in: Atom PDF