问题原文
原帖链接 · 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?
已采纳解答
原帖链接 · 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:
There's no difference in this matter between Access Server and community edition, the engine is the same.
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
