Asterisk + OpenVPN, should OpenVPN run with realtime priority?

Hi!

We have a Debian system with Asterisk and several hundred phones connected via OpenVPN.
Currently, Asterisk runs with realtime priority (as is its default) and OpenVPN with the standard scheduling policy but with priority 10 (nice -10).

I am thinking about the benefits or drawbacks of running the openvpn process also with realtime priority, since it has to transfer most of the SIP and audio traffic going to and from Asterisk. It seems that if Asterisk is running realtime to get everything processed and out the door asap, and this traffic is then handled to a daemon that is not running realtime, you may get unwanted delays if the host gets a higher load. On the other hand, nowhere have I found the advice to do this, so it might be unneccesary.

Note that we aren’t experiencing any issues currently, but I wonder if running openvpn realtime will prevent some in the future.

Any thoughts on this subject?

Thanks a lot, Roel

On modern hardware with the same number of users of both services, Asterisk will likely utilize more CPU cycles than OpenVPN, so your current priority assignments are probably fine.

Other factors to consider are if you are doing any sort of transcoding between channels, such as converting G722 to/from G711 – that is CPU intense. The VPN encryption can also be more CPU intense on older CPUs lacking AES instructions.

Is asterisk startup configured to systemctl script? If so, how about to add on asterisk systemctl script the after option?
There are other options, may be it could help.

Looking at the relative amount of consumed CPU cycles is a good hint. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.