大网数据广告活动
服务器运维问答

OpenVPN multi-core CPU for 2Gbps

· 52CE 我爱测

For an OpenVPN server, with AES-256-CBC encryption, LZ4 compression, and forwarding traffic to internet, official requirements states: As a rule of thumb you should assume that on a modern CPU with AES-NI chipset, for every megab…

问题原文

原帖链接 · RoeeK · CC BY-SA 4.0

For an OpenVPN server, with AES-256-CBC encryption, LZ4 compression, and forwarding traffic to internet, official requirements states:

As a rule of thumb you should assume that on a modern CPU with AES-NI chipset, for every megabit per second of data traffic (in one direction) you need about 20MHz

this means that for 6Gbps (two directions), hardware requirements for the server are a total of:

6Gbps x 2 = 12Gbps

12 x 1000 / 20 = 600GHz (assume 1Gb = 1000Mb).

The example from OpenVPN is (250 active users with 10Mbps each):

2500Mbps times 20MHz is about 50000MHz or 50GHz. Processors with 3.5GHz for example in dual octa-core setup would get you over those requirements.

Which means OpenVPN will use 16 CPU cores of 3.5GHz to get a total of 50GHz.

It breaks every "internet forum rule" as per 'OpenVPN uses only a single core'.

What is the explanation to this clear guideline in OpenVPN official hardware requirements saying multiple CPU cores, solve scaling issue?

They call 2.5 Gbps: "A reasonably demanding setup", with no word about having to split the load to multiple VPN instances on different ports.

How can that be?

OpenVPN Hardware Requirements

已采纳解答

原帖链接 · RoeeK · CC BY-SA 4.0

I checked with OpenVPN Access Server support regarding the question: what's OpenVPN Access Server magic that allows it to utilize multiple CPU cores.

According to the answer:

  1. There's no difference in this matter between Access Server and community edition, the engine is the same.

  2. OpenVPN Access Server just opens multiple OpenVPN instances, and load-balance between them. The same standard scaling method for community edition.

Also relevant and non-documented information is regarding how automated is Access Server scaling process. It's a bit off-topic, but I believe it's interesting for people reading this post:

  • The load-balancing is done with iptables.
  • The user needs to configure how many OpenVPN processes should be used.
  • Each OpenVPN instance has its own listening port, TUN/TAP interface, and virtual subnet.
  • OpenVPN Access Server maintains the routing between the different instances (between clients of each instance)
  • in Layer2, all the TAP interfaces will be bridged under a single interface to allow clients in different instances know each other.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。