Multi-Daemon Mode

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
User avatar
krypto
OpenVpn Newbie
Posts: 5
Joined: Fri Mar 01, 2013 9:13 am
Location: ::1
Contact:

Multi-Daemon Mode

Post by krypto » Thu Mar 28, 2013 10:32 am

Hi OpenVPN Team
Server's got 2 CPU cores - currently Multi-Daemon Mode is enabled with 1 TCP daemon & 1 UDP daemon.
According to tip description:
It is not recommended to set the number of TCP and UDP daemons to a higher value than the number of processor cores on the machine
Q1: Does this mean I need to stick to current configuration where I've got 2 deamons in total (where there are 2 cores == 2 daemons (1 per protocol) or I can use i.e. 4 daemons (2 per protocol)? because it's not clear for me
Q2: Can I use mixed options (i.e use 2 TCP daemons & 1 UDP or 3 UDP & 1 TCP)?
Pozdrawiam/Kind regards/Mit freundlichen Grüßen/Cordialement
Pawel Osobinski (krypto)

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: Multi-Daemon Mode

Post by novaflash » Fri Mar 29, 2013 9:48 am

Hello Krypto,

If you have 2 CPU cores, it is recommended to set these values to 2 TCP daemons and 2 UDP daemons. The reason is that the OpenVPN core at the moment stays on one CPU core, and clients can connect over either TCP or UDP. That means that if all your clients connect over UDP (which is the recommended mode), it can split the workload over the 2 CPU cores on the UDP daemons. In your current situation, it would just be loaded onto 1 CPU core because you have only 1 UDP daemon running.

Yes, it is possible to use mixed configurations, but never set the number of daemons per protocol (UDP or TCP) higher than the amount of CPU cores. Access Server tries to balance the load between the CPU cores but if there are 2 processes both running on the same core this can cause some unexpected behavior. Best not to do this. So on a 2 CPU core system, you could do 2 UDP and 1 TCP, but not 3 UDP and 1 TCP. This wouldn't be any use.

I trust I have provided you with the answers you were looking for. If you have further questions, feel free to ask.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

User avatar
krypto
OpenVpn Newbie
Posts: 5
Joined: Fri Mar 01, 2013 9:13 am
Location: ::1
Contact:

Re: Multi-Daemon Mode

Post by krypto » Fri Mar 29, 2013 11:51 am

Thanks now everything is clear :)
Pozdrawiam/Kind regards/Mit freundlichen Grüßen/Cordialement
Pawel Osobinski (krypto)

Post Reply