PHP performance. HHVM. PHP5.5 OPCACHE

Acabo de actualizar a Ubuntu 13.10 desde la 13.04 y luego de verificar algunas cosas el sistema reporta :

Apache Version Apache/2.4.6 (Ubuntu)
PHP Version 5.5.3-1ubuntu2
Registered Stream Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

Y luego de dudar sobre las dependencias de HHVM, instalo la version 2.2.0 y la configuro en el puero 9090

Tengo dos script, el primero hace uso de intensivo de sort() y arsort() ( ej test-fast.php ) link https://gist.github.com/puentesdiaz/7086714.

Y el segundo es una funcion finobacci ( ej test-fast-2.php ) link https://gist.github.com/puentesdiaz/7163344 …

(ver mas info en http://alexfu.it/2013/10/22/symfony-benchmark-on-hhvm.html )

Cuando la URL tenga el puerto 9090, sabran que estamos empleando HHVM

****************************************************
$ ab -n 100 -c 10 http://localhost/labs/test-fast.php
****************************************************

Server Software: Apache/2.4.6

Server Hostname: localhost
Server Port: 80

Document Path: /labs/test-fast.php
Document Length: 134 bytes

Concurrency Level: 10
Time taken for tests: 168.649 seconds
Complete requests: 100
Failed requests: 24
(Connect: 0, Receive: 0, Length: 24, Exceptions: 0)
Write errors: 0
Total transferred: 34271 bytes
HTML transferred: 13371 bytes
Requests per second: 0.59 [#/sec] (mean)
Time per request: 16864.882 [ms] (mean)
Time per request: 1686.488 [ms] (mean, across all concurrent requests)
Transfer rate: 0.20 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.6 0 8
Processing: 12895 16644 1363.9 16888 19412
Waiting: 12895 16643 1364.4 16888 19412
Total: 12896 16644 1363.6 16888 19412

Percentage of the requests served within a certain time (ms)
50% 16888
66% 17270
75% 17673
80% 17756
90% 18231
95% 18478
98% 19289
99% 19412
100% 19412 (longest request)

****************************************************
$ ab -n 100 -c 10 http://localhost:9090/test-fast.php
****************************************************

Server Software:
Server Hostname: localhost
Server Port: 9090

Document Path: /test-fast.php
Document Length: 135 bytes

Concurrency Level: 10
Time taken for tests: 4.422 seconds
Complete requests: 100
Failed requests: 24
(Connect: 0, Receive: 0, Length: 24, Exceptions: 0)
Write errors: 0
Total transferred: 23468 bytes
HTML transferred: 13468 bytes
Requests per second: 22.62 [#/sec] (mean)
Time per request: 442.182 [ms] (mean)
Time per request: 44.218 [ms] (mean, across all concurrent requests)
Transfer rate: 5.18 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 1
Processing: 309 429 64.7 432 601
Waiting: 309 429 64.7 432 601
Total: 309 429 64.7 432 601

Percentage of the requests served within a certain time (ms)
50% 432
66% 449
75% 481
80% 493
90% 520
95% 529
98% 584
99% 601
100% 601 (longest request)

=========================================

Ahora pasemos a la función fibonacci:

*****************************************************
ab -n 10 -c 10 http://localhost/labs/test-fast-2.php
*****************************************************

Server Software: Apache/2.4.6
Server Hostname: localhost
Server Port: 80

Document Path: /labs/test-fast-2.php
Document Length: 143 bytes

Concurrency Level: 10
Time taken for tests: 12.859 seconds
Complete requests: 10
Failed requests: 1
(Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Write errors: 0
Total transferred: 3519 bytes
HTML transferred: 1429 bytes
Requests per second: 0.78 [#/sec] (mean)
Time per request: 12859.493 [ms] (mean)
Time per request: 1285.949 [ms] (mean, across all concurrent requests)
Transfer rate: 0.27 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 11692 12461 346.8 12597 12859
Waiting: 11691 12461 346.8 12597 12859
Total: 11692 12461 346.8 12597 12859

Percentage of the requests served within a certain time (ms)
50% 12597
66% 12603
75% 12668
80% 12780
90% 12859
95% 12859
98% 12859
99% 12859
100% 12859 (longest request)

*****************************************************
ab -n 10 -c 10 http://localhost:9090/test-fast-2.php
*****************************************************

Server Software:
Server Hostname: localhost
Server Port: 9090

Document Path: /test-fast-2.php
Document Length: 145 bytes

Concurrency Level: 10
Time taken for tests: 0.142 seconds
Complete requests: 10
Failed requests: 5
(Connect: 0, Receive: 0, Length: 5, Exceptions: 0)
Write errors: 0
Total transferred: 2441 bytes
HTML transferred: 1441 bytes
Requests per second: 70.23 [#/sec] (mean)
Time per request: 142.394 [ms] (mean)
Time per request: 14.239 [ms] (mean, across all concurrent requests)
Transfer rate: 16.74 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 61 104 32.6 123 142
Waiting: 61 104 32.8 123 142
Total: 61 104 32.6 123 142

Percentage of the requests served within a certain time (ms)
50% 123
66% 124
75% 124
80% 138
90% 142
95% 142
98% 142
99% 142
100% 142 (longest request)

===============================================

 

Mas Test:

***********************************************************
ab -n 10000 -c 10 http://localhost:9090/test-fast-2.php

Server Software:
Server Hostname: localhost
Server Port: 9090

Document Path: /test-fast-2.php
Document Length: 145 bytes

Concurrency Level: 10
Time taken for tests: 144.506 seconds
Complete requests: 10000
Failed requests: 8302
(Connect: 0, Receive: 0, Length: 8302, Exceptions: 0)
Write errors: 0
Total transferred: 2438997 bytes
HTML transferred: 1438997 bytes
Requests per second: 69.20 [#/sec] (mean)
Time per request: 144.506 [ms] (mean)
Time per request: 14.451 [ms] (mean, across all concurrent requests)
Transfer rate: 16.48 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 33 144 51.0 141 378
Waiting: 33 144 50.6 140 378
Total: 33 144 51.0 141 378

Percentage of the requests served within a certain time (ms)
50% 141
66% 164
75% 179
80% 188
90% 213
95% 233
98% 257
99% 274
100% 378 (longest request)

 

Esta entrada fue publicada en General y etiquetada , . Guarda el enlace permanente.

Deja un comentario