Link to home
Start Free TrialLog in
Avatar of Ludwig Diehl
Ludwig DiehlFlag for Peru

asked on

apache mod_php performance

Hello Everyone!

I have been doing some benchmarks with apache and php and found out that apache 2.4.29 (Remi repo) with php 7.2 is slower than apache 2.4.6 (Centos 7 repo) with the same version of apache. I even tried compiling apache with the same results. Does anybody have a clue why is this?. I also tried disabling almost all apache modules, same result.

thanks in advance

Btw.
I am using CentOS 7.4.1708 (linux 3.10.0-693.5.2.el7.x86_64)
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PHP-7.2 speed tests... Respectable... 0 failures @ 1M+ reqs/min... Sufficient for most sites...

lxd: net11-ubuntu-zesty-php72 # h2speed --compact --count=1000 https://net11.ubuntu.zesty.php72.davidfavor.com/hello.php
h2load -ph2c -t16 -c16 -m16 -n16000 https://net11.ubuntu.zesty.php72.davidfavor.com/hello.php
finished in 900.59ms, 17766.13 req/s, 2.07MB/s
requests: 16000 total, 16000 started, 16000 done, 16000 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 16000 2xx, 0 3xx, 0 4xx, 0 5xx
Requests per second: 17,766.13
Requests per minute: 1,065,967.8
Requests per hour  : 63,958,068

Open in new window


My LAMP Stack package details.
Avatar of Ludwig Diehl

ASKER

So you recommend using  Apache-2.4.29 + mpm_event + mod_http2 + PHP FPM. However I have read that mod_http2 consumes more memory and CPU.
btw should I use  the thread-safe or the non-thread version with the configuration you suggest?