[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

[Openvpn-users] OpenVPN 2.1 performance tests

  • Subject: [Openvpn-users] OpenVPN 2.1 performance tests
  • From: Florin Andrei <florin@xxxxxxxxxxxxxxx>
  • Date: Wed, 30 May 2007 10:10:32 -0700

Purpose: To determine the maximum file transfer speed and bandwidth
usage with OpenVPN 2.1 on recent hardware (early 2007) and Linux. The
file transfer protocols used in the tests were HTTP, FTP and NFS.

Results - executive summary:
- all 3 protocols (HTTP, FTP, NFS) exhibit very similar transfer speeds
- file transfer speeds with a quad-core 2.4GHz 64 bit Linux VPN server
are in the region of 14 ... 22 Mbyte / sec (only one core is actually
used by OpenVPN)
- bandwidth usage is in the region of 8 ... 22 Mbyte / sec
- the limiting factor is the CPU speed on the VPN server
- text files are compressed 3:1 but compression does not increase the
file transfer speed significantly, but mostly just decreases the
bandwidth usage

Test environment - the network:
Two identical systems, connected via a Gigabit switch (a cheap D-Link
DGS-2205 switch).
The gigabit network is used solely for the file transfers. To login to
the systems, both machines are dual-homed and the login sessions are
performed via different network interfaces.
Please note that the server was a file- and VPN-server at the same time,
and the client was a file- and VPN-client at the same time, so this is
not a true VPN gateway test - such a test would have been much more
complicated, requiring 4 systems and 3 switches. However, I believe the
results are quite relevant even with my simple setup, I don't expect a
VPN gateway test to provide very different numbers (perhaps in the
vicinity of 10 ... 15%).

Test environment - the systems:
Motherboard: Tyan Transport GT24-B3992
CPU: 2 x AMD Opteron dual-core 2.4GHz 64 bit
Memory: 8GB 667MHz
Network interfaces: Broadcom NetXtreme BCM5780 Gigabit
HDD: 3 x Seagate ST3250620AS SATA 250GB

Test environment - OS + software:
CentOS 5 64 bit fully updated as of 2007/05/25
Linux kernel 2.6.18-8.1.4.el5
GigE driver (kernel module): tg3
OpenVPN 2.1-0.19.rc4
Apache 2.2.3-6.el5.centos.1
VsFTPD 2.0.5-10.el5
lftp 3.5.1-2.fc6

The OS is almost a default install. The file system was mostly a huge
LVM stripping volume across all hard-drives, for maximum space and speed.
All file servers are using the default CentOS settings.
OpenVPN is using the sample certificates and the sample server.conf and
client.conf. When compression was enabled, it was non-adaptive.
The NFS share was *(ro,no_root_squash,insecure,sync)

Test environment - the file repository:
- text files, 2.9GB, 30 files, very similar to Apache logs
- binary files, 3GB, 3 files, generated via "dd if=/dev/urandom" for
maximum randomness (cannot be compressed)

lftp was used as an HTTP and FTP client. The timing and transfer speed
measurements for HTTP and FTP were based on the information provided by
"cp -a" was used to transfer files via NFS. The timing was provided via
"time cp -a" and the transfer speed was deduced from the file size.
Before any transfer, the disk cache on the server was refreshed (cat
file > /dev/zero) to make sure that all files were served from RAM.
The bandwidth usage was deduced by running "ifconfig eth0" before and
after the transfer, performing the difference between the TX bytes
counters and dividing it by the transfer time.

Detailed results:
1. Direct transfers (bypassing OpenVPN)
Approx 110 Mbyte / sec for HTTP and FTP, NFS is 20% slower
CPU utilization on the server - 4 ... 9%

2. VPN non-adaptive compression

2.1. Binary files
Approx 14.7 Mbyte / sec file transfer speed.
Bandwidth usage was not measured, but it is assumed to be close
(slightly higher) to the transfer speed (binary files do not compress).
CPU usage on server: openvpn pegged at 100%, file server daemons at 3%

2.2. Text files
Approx 22.5 Mbyte / sec file transfer speed
Approx 8.4 Mbyte / sec bandwidth utilization (3:1 compression)
CPU usage on server: openvpn pegged at 96%

3. VPN no compression

No difference between binary and text files.
Approx 20.5 Mbyte / sec file transfer speed
Approx 22.5 Mbyte / sec bandwidth utilization
openvpn pegged at 92%

For complete results, see this spreadsheet:


James, feel free to include this benchmark in the documentation on
openvpn.net if you wish.


Florin Andrei


Openvpn-users mailing list