Ich habe ab entdeckt und damit bisschen rumprobiert. Aktuell habe ich im Documentroot nur eine statische index.html mit dem Text Hallo liegen. Unverschlüsselt erscheinen mir die Zeiten optimal:
ab -c 1 -n 10 http://sub.domain.de/ ... Benchmarking sub.domain.de (be patient).....done Server Software: Apache/2.4.18 Server Hostname: sub.domain.de Server Port: 80 Document Path: / Document Length: 7 bytes Concurrency Level: 1 Time taken for tests: 0.542 seconds Complete requests: 10 Failed requests: 0 Total transferred: 2510 bytes HTML transferred: 70 bytes Requests per second: 18.44 [#/sec] (mean) Time per request: 54.221 [ms] (mean) Time per request: 54.221 [ms] (mean, across all concurrent requests) Transfer rate: 4.52 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 27 27 0.6 27 29 Processing: 27 27 0.4 27 28 Waiting: 26 27 0.4 27 27 Total: 53 54 0.8 54 56 Percentage of the requests served within a certain time (ms) 50% 54 66% 54 75% 54 80% 54 90% 56 95% 56 98% 56 99% 56 100% 56 (longest request)
während es verschlüsselt (LetsEncrypt, Schlüssellänge 4096 Bits, ich habs aber auch mit 2048 versucht, kein nennenswerter Unterschied) so ausschaut:
ab -c 1 -n 10 https://sub.domain.de/ ... Benchmarking sub.domain.de (be patient).....done Server Software: Apache/2.4.18 Server Hostname: sub.domain.de Server Port: 443 SSL/TLS Protocol: TLSv1.2,DHE-RSA-AES256-GCM-SHA384,4096,256 Document Path: / Document Length: 7 bytes Concurrency Level: 1 Time taken for tests: 7.947 seconds Complete requests: 10 Failed requests: 0 Total transferred: 2960 bytes HTML transferred: 70 bytes Requests per second: 1.26 [#/sec] (mean) Time per request: 794.740 [ms] (mean) Time per request: 794.740 [ms] (mean, across all concurrent requests) Transfer rate: 0.36 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 368 401 20.1 412 423 Processing: 366 393 22.2 394 442 Waiting: 366 393 22.1 393 442 Total: 739 795 34.9 799 864 Percentage of the requests served within a certain time (ms) 50% 799 66% 804 75% 812 80% 815 90% 864 95% 864 98% 864 99% 864 100% 864 (longest request)
Der Vhost für die Subdomain verschlüsselt schaut so aus:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <VirtualHost *:443> ServerName sub.domain.de ProxyRequests Off DocumentRoot /var/www/test/web SSLEngine on SSLCertificateFile /etc/letsencrypt/live/sub.domain.de/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/sub.domain.de/privkey.pem SSLProtocol All -SSLv2 -SSLv3 SSLCompression off SSLHonorCipherOrder On SSLCipherSuite EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SH Header add Strict-Transport-Security "max-age=15768000" # Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" ErrorLog /var/www/test/logs/error.log CustomLog /var/www/test/logs/access.log combined <Directory /var/www/test/web> Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> |
Wenn ich die Zeilen 13-17 in Kommentare verwandle, reduzieren sich die einzelnen Zeiten des Benchmarks auf ca. 500 ms.
Ich habe dann testweise mal https://www.thomas-leister.de/ gebencht, da wird unter SSL/TLS Protocol der identische String aufgeführt, jedoch liefen die einzelnen Zugriffe zwischen 134 und 149 ms ab. Auch https://axebase.net/ ist diesbezüglich deutlich flotter, verwendet 2048 Bit. Daher vermute ich irgendeine ungünstige Einstellung in meinem Setup. Options FollowSymLinks und AllowOverride All habe ich testweise auch mal rausgenommen.
Ergänzung: Mich stören da weniger die aktuellen Zeiten im Singlezugriffsbench, sondern dass es bei z.B. 20 gleichzeitigen Zugriffen dann richtig gravierend wird:
ab -c 20 -n 200 https://sub.domain.de/ ... Percentage of the requests served within a certain time (ms) 50% 6180 66% 6245 75% 6288 80% 6310 90% 6362 95% 8347 98% 8424 99% 9143 100% 9171 (longest request)
Für Vorschläge zur Optimierung der SSL-Performance bin ich dankbar. Falls noch Infos fehlen, liefere ich die gerne nach.