Hace tiempo que quería testear el Lite Speed. Había oído hablar muy bien de el. Se trata de un servidor web con licencia que trae una interfaz de administración y opciones interesantes como compilar php al vuelo mediante la interfaz de una forma muy simple.
Pero lo que me interesaba era el rendimiento. Y me he llevado alguna que otra sorpresa. El software de pruebas es un WordPress funcionando bajo PHP 5.3.3 y APC 3.1.9. En dos servidores Centos 6 con características parejas.
La base de datos es MysQL 5.5 en un caso y 5.1 en otro aunque comparten el mismo my.cnf. Por otro lado la instalación de Lite Speed es por defecto sin tunear.
Ambos WordPress fueron testeados; en el caso del contenido dinámico; sin caché de por medio, es decir, sin WP CACHE, W3 TOTAL CACHE, o similares. Para probar el rendimiento sin cachés de por medio (aunque sigamos teniendo el APC y el QUERY CACHE, hice las pruebas después de un reinicio de servidor web)
1. Contenido dinámico
# ab -c10 -n10 http://rubenortiz.es/ This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking rubenortiz.es (be patient).....done Server Software: Apache/2.2.3 Server Hostname: rubenortiz.es Server Port: 80 Document Path: / Document Length: 0 bytes Concurrency Level: 10 Time taken for tests: 7.70842 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Non-2xx responses: 10 Total transferred: 5330 bytes HTML transferred: 0 bytes Requests per second: 1.41 [#/sec] (mean) Time per request: 7070.841 [ms] (mean) Time per request: 707.084 [ms] (mean, across all concurrent requests) Transfer rate: 0.71 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 3107 5141 1232.0 5369 7070 Waiting: 3104 5140 1232.5 5368 7069 Total: 3107 5141 1232.0 5369 7070 Percentage of the requests served within a certain time (ms) 50% 5369 66% 5516 75% 6261 80% 6265 90% 7070 95% 7070 98% 7070 99% 7070 100% 7070 (longest request)
# ab -c 10 -n 10 https://www.rubenortiz.es/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.rubenortiz.es (be patient).....done Server Software: LiteSpeed Server Hostname: www.rubenortiz.es Server Port: 80 Document Path: / Document Length: 83936 bytes Concurrency Level: 10 Time taken for tests: 8.564 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Total transferred: 843600 bytes HTML transferred: 839360 bytes Requests per second: 1.17 [#/sec] (mean) Time per request: 8564.082 [ms] (mean) Time per request: 856.408 [ms] (mean, across all concurrent requests) Transfer rate: 96.20 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 1 2 0.6 2 3 Processing: 5191 6880 1763.4 8550 8561 Waiting: 5002 6765 1837.5 8496 8545 Total: 5192 6883 1763.6 8552 8564 Percentage of the requests served within a certain time (ms) 50% 8552 66% 8553 75% 8554 80% 8555 90% 8564 95% 8564 98% 8564 99% 8564 100% 8564 (longest request)
1.1 Resumen test
Apache 2.2.3 => 1.41
LiteSpeed => 1.17
OO! Pues la verdad no me esperaba yo esto. Apache funciona un poco mejor que Lite Speed en contenido dinámico sin cachear. Bueno, va bien saberlo, para eso probamos.
Vamos a ver como cachea esto ahora contra contenido estático. Para eso utilizaremos el software de cache de WP Super Cache, una evolución del de R.Galli, que lo que hará es generar .html estáticos. Así que configuré ambos entornos con ese software y me dispuse a probar.
2. Contenido estático
# ab -c10 -n10 http://rubenortiz.es/ This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking rubenortiz.es (be patient).....done Server Software: Apache/2.2.3 Server Hostname: rubenortiz.es Server Port: 80 Document Path: / Document Length: 0 bytes Concurrency Level: 10 Time taken for tests: 1.700771 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Non-2xx responses: 10 Total transferred: 5400 bytes HTML transferred: 0 bytes Requests per second: 5.88 [#/sec] (mean) Time per request: 1700.771 [ms] (mean) Time per request: 170.077 [ms] (mean, across all concurrent requests) Transfer rate: 2.94 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 2 1.3 3 3 Processing: 818 1193 277.8 1235 1696 Waiting: 816 1192 278.4 1235 1696 Total: 820 1195 278.2 1238 1699 Percentage of the requests served within a certain time (ms) 50% 1238 66% 1247 75% 1344 80% 1562 90% 1699 95% 1699 98% 1699 99% 1699 100% 1699 (longest request)
ab -c10 -n10 https://www.rubenortiz.es/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.rubenortiz.es (be patient).....done Server Software: LiteSpeed Server Hostname: www.rubenortiz.es Server Port: 80 Document Path: / Document Length: 83908 bytes Concurrency Level: 10 Time taken for tests: 0.012 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Total transferred: 843060 bytes HTML transferred: 839080 bytes Requests per second: 841.82 [#/sec] (mean) Time per request: 11.879 [ms] (mean) Time per request: 1.188 [ms] (mean, across all concurrent requests) Transfer rate: 69307.25 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 1 2 0.6 3 3 Processing: 2 5 2.1 4 9 Waiting: 0 4 2.4 4 8 Total: 3 7 2.5 7 11 WARNING: The median and mean for the initial connection time are not within a normal deviation These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 7 66% 8 75% 9 80% 10 90% 11 95% 11 98% 11 99% 11 100% 11 (longest request)
2.1 Resumen test
Apache 2.2.3 => 5.88
LiteSpeed => 841.82
Wow, ahora si el tema cambia. Como se puede observar, LS sirve muchísimo más rápido el contenido estático. No hay color.
Por otra parte, si vamos aumentando la concurrencia de sesiones que piden la home cacheada de wordpress, veremos que mientras por Apache el resultado es mucho mucho peor, en LiteSpeed aumenta el rendimiento, increíble!
Pros de LS: compatible con Apache, estable, muy buen rendimiento en contenido estático.
Es una opción a tener en cuenta en el futuro a corto plazo 🙂