Topic: [SOLVED] Upload speeds slower in Windows?

I ran some upload speed tests recently using curl as a client to apache httpd on localhost and compared SSL backends OpenSSL 1.0.2g, WinSSL (Windows 7) and wolfSSL v3.9.0. wolfSSL was the slowest by a lot and I can't figure out why. I asked my colleague to test in Linux and he could not reproduce using v3.7.0. I tried v3.7.0 but I get the same speeds. I thought maybe it could be the options I was using so I recompiled wolfSSL v.3.9.0 in Visual Studio using nothing but OPENSSL_EXTRA. Still, the speeds are slower by comparison.

For example:

HTTPS: 'DLL Release - DLL OpenSSL' x64 - CURL_MAX_WRITE_SIZE 16384
Transfer rate: 224976 KB/sec (4000000000 bytes in 17 seconds)

HTTPS: 'DLL Release - DLL wolfSSL' x64 - CURL_MAX_WRITE_SIZE 16384
Transfer rate: 15148 KB/sec (4000000000 bytes in 258 seconds)

I did some profiling and GHASH was taking most of the time. Do you have any idea what would cause such a significant difference? Have you noticed a performance decrease in Windows at high speeds?

Share

Re: [SOLVED] Upload speeds slower in Windows?

Hi Ray,

Since your colleague tried the same test on Linux and wasn't able to see the performance delta that you did, my guess is that it is a difference in compilation options used by either OpenSSL and/or wolfSSL on those two different platforms.

The one that comes to mind is support for Intel AES-NI instructions.  Since you mentioned GHASH, you must be using an AES-GCM based cipher suite.  If OpenSSL had been compiled with AES-NI support on Windows but wolfSSL had not, that would explain the performance difference.  You can enable AES-NI support when compiling wolfSSL by defining WOLFSSL_AESNI.  This assumes that you are on an Intel processor with AES-NI support, and that your toolchain supports the AES-NI intrinsics.

Best Regards,
Chris

Re: [SOLVED] Upload speeds slower in Windows?

Thanks Chris, you're right it was the lack of AESNI.

Share

Re: [SOLVED] Upload speeds slower in Windows?

Glad to hear we found the missing piece of the puzzle.  Thanks for looping back and letting us know.