Project

General

Profile

Actions

Todo #7507

closed

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

Added by Jim Pingle almost 7 years ago. Updated almost 7 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:

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.
Actions #1

Updated by Jim Pingle almost 7 years ago

  • Description updated (diff)
Actions #2

Updated by Jim Pingle almost 7 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle almost 7 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.

Actions #4

Updated by Bipin Chandra almost 7 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

Actions #5

Updated by Jim Pingle almost 7 years ago

  • Status changed from Feedback to Resolved

Thanks for testing!

Actions

Also available in: Atom PDF