What's new

openvpn: ciphers and numbers of cores used

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cosmoxl

Senior Member
Using the new firmware that charts CPU usage of both cores I note for the first time that the openvpn client uses 1 or both cores depending on the cipher used.

I use both private internet access and AirVPN. PIA uses BF-CBC while AirVPN uses AES-256-CBC.

When connected to PIA only 1 core is used. When connected to AirVPN both cores are used.

I have long noted that it seemed that AirVPN reached max speed much easier than PIA and this was a puzzle to me seeing that AES-256-CBC should be more CPU intensive than BF-CBC. Now this puzzle is explained.

RMerlin, where does the limitation of BF-CBC to 1 core in this situation arise?
 
Using the new firmware that charts CPU usage of both cores I note for the first time that the openvpn client uses 1 or both cores depending on the cipher used.

I use both private internet access and AirVPN. PIA uses BF-CBC while AirVPN uses AES-256-CBC.

When connected to PIA only 1 core is used. When connected to AirVPN both cores are used.

I have long noted that it seemed that AirVPN reached max speed much easier than PIA and this was a puzzle to me seeing that AES-256-CBC should be more CPU intensive than BF-CBC. Now this puzzle is explained.

RMerlin, where does the limitation of BF-CBC to 1 core in this situation arise?

No idea. You'd have to ask the OpenSSL developers.
 
This situation has changed into something more interesting perhaps.

I have the two VPN providers mentioned above and until a few days ago kept the config for PIA in client 1 and Air in client 2.

Then I began testing some other VPN providers so the use of openvpn clients in my router got changed around.

I quickly realized that anytime ovpn client 2 was being used, both CPU cores were used. But when the same ovpn config was used in client 1, only 1 CPU core is used.

Client 1 uses exclusively core 1. Client 2 uses core 2 predominantly, at bout twice the usage as core 1. eg, for the same speed download, client 1 uses core 1 at 33% and core 2 at 0% while client 2 uses core 1 at 14% and core 2 at 25%.

I have the ac68 with 376.45. Can anybody else confirm this behavior?
 
This situation has changed into something more interesting perhaps.

I have the two VPN providers mentioned above and until a few days ago kept the config for PIA in client 1 and Air in client 2.

Then I began testing some other VPN providers so the use of openvpn clients in my router got changed around.

I quickly realized that anytime ovpn client 2 was being used, both CPU cores were used. But when the same ovpn config was used in client 1, only 1 CPU core is used.

Client 1 uses exclusively core 1. Client 2 uses core 2 predominantly, at bout twice the usage as core 1. eg, for the same speed download, client 1 uses core 1 at 33% and core 2 at 0% while client 2 uses core 1 at 14% and core 2 at 25%.

I have the ac68 with 376.45. Can anybody else confirm this behavior?

Client 1 is told to use core 2, and client 2 is told to use core 1. What you are seeing is probably the CPU usage for other processes (such as the actual traffic routing done by the kernel), which will always use the same core. That bit is unrelated to the CPU usage done by the openvpn executable itself.
 
Client 1 is told to use core 2, and client 2 is told to use core 1. What you are seeing is probably the CPU usage for other processes (such as the actual traffic routing done by the kernel), which will always use the same core. That bit is unrelated to the CPU usage done by the openvpn executable itself.

I think you are implying that were I to download without VPN I'd still see some CPU usage from "actual traffic routing", on the order of 10-15%. That just isn't the case. If I download without VPN the CPU usage is on the order of 0-2%.
 
I think you are implying that were I to download without VPN I'd still see some CPU usage from "actual traffic routing", on the order of 10-15%. That just isn't the case. If I download without VPN the CPU usage is on the order of 0-2%.

That depends on whether that traffic is HW accelerated or not, amongst other things.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top