SSL on Apache seems to significantly affect WebDAV performace

apache-2.2curlsslwebdavwindows-xp

I'm using Apache 2.2 running on Windows Server 2008 R2 as a WebDAV server for clients to upload large media files (roughly 100-2000MB). I am finding that when I have SSL enabled (openSSL 0.9.8o) and use HTTPS for the uploads the throughput is around 13Mbps but when I disable it and just use HTTP I get around 80Mbps. I can't understand why this is happening as my understanding was that the heavy SSL work was done at the beginning of the connection.

If it helps the client that I am using is command line cURL and here is the command:

curl -k -f -u digital:recorder -T 00320120321101048_ch1.mkv http://mediaserver/webdav/
curl -k -f -u digital:recorder -T 00320120321101048_ch1.mkv https://mediaserver/webdav/

Does anyone have any idea why the performance is so drastically affected by enabling SSL?

Cheers.

UPDATE: The problem does not exist on Windows 7 clients so this only happens on XP. This at least identifies that the issue is at the client end. I am running the exact same command line from both systems but it only affects WinXP. Does anyone know of why that might be? That XP is somehow crippling the SSL upload speed?

I've run tests on Fedora Linux as well. So the issue has now been closer defined to be that the same version of cURL + OpenSSL uploading the same file to the same server is fast on Linux and Windows 7 but very slow on Windows XP.

Can anybody help with this because I've really hit a brick wall!

Best Answer

SSL encryption is a CPU-intensive task. The "heavy SSL work" is not done just after the connection is started, but the encryption must be done for the entire file upload.

Check the CPU consumption of your server with and without enabling SSL and you will see a big difference.