HW Acceleration in OpenVPN
-
Perfectly fine.
OpenVPN makes a call to OpenSSL to do the crypto.
OpenSSL has built-in code that will use hardware acceleration automatically if it`s available. -
Excellent, thanks! Figured that setting would capture it also, but not a huge issue if not.
Is there a way to check if it's using AES-NI?
-
Excellent, thanks! Figured that setting would capture it also, but not a huge issue if not.
Is there a way to check if it's using AES-NI?
It's fairly impossible to make it not use AES-NI. In older versions of pfsense you could turn on /dev/crypto to make openvpn slower, but that's been fixed.
-
Can you not just run an openssl speed test? This should tell you right away if your using aes-ni should it not?
-
Yep, that should be possible. Hunting around to see if there is a way to force it off and on (HW accel that is), to be able to confirm.
Thanks!
-
With:
openssl speed -elapsed -evp aes-256-gcm -multi 4
Without:
env OPENSSL_ia32cap=0 openssl speed -elapsed -evp aes-256-gcm -multi 4
Edit, changed cbc to gcm.
-
I would be surprised if you saw a difference in speed with AES-NI in use or not with OpenVPN. There is a lot of overhead already there that has nothing to do with crypto operations.
If anything you might see less CPU utilization to accomplish the same speeds but that is more difficult to measure.
-
Thanks for all the help - much appreciated!
-
Welcome.
I`ve not done tests with gcm but with cbc some time ago:
https://forum.pfsense.org/index.php?topic=115627.msg647436#msg647436Curious for the gcm results…..
-
I would be surprised if you saw a difference in speed with AES-NI in use or not with OpenVPN. There is a lot of overhead already there that has nothing to do with crypto operations.
If anything you might see less CPU utilization to accomplish the same speeds but that is more difficult to measure.
I would expect a measurable but not dramatic speedup moving to GCM and changing from aes256 to aes128. It's worth doing, but won't fundamentally change the performance characteristics of a machine.