[Info-vax] Apache + mod_php performance

Arne Vajhøj arne at vajhoej.dk
Wed Oct 2 11:32:58 EDT 2024


Summary numbers and analysis.

                         no db con pool     db con pool
Apache + CGI               4 req/sec           N/A
Apache + mod_php (cfg A)  11 req/sec         11 req/sec
Apache + mod_php (cfg B)  22 req/sec         22 req/sec
Apache + mod_php (cfg C)  94 req/sec        103 req/sec
Apache + mod_php (cfg D)  85 req/sec         83 req/sec
Tomcat + Quercus         208 req/sec        214 req/sec
Apache + mod_php (win) ~1200 req/sec      ~6000 req/sec

Note that Windows got more CPU and RAM than VMS, so not really
comparable. With resources similar to VMS then I would expect
maybe 1/10'th of througput.

I have not tested Apache on Linux, but I would expect the numbers
to be even higher than Windows - it is what is used by most of the web.

config       KeepAlive   KeepALiveTimeout     MaxSpareServers    MaxClients
   A             On             15                   10               150
   B             On             15                   50               300
   C             Off            N/A                  50               300
   D             On             1                   300               300

A is default config
B is as many resources that my VMS system could support
C is keep alive disabled
D is keep alive limited

Allocating as many resources as one can spare make sense. But it can
be a lot of resources. Expect memory usage to be MaxClients * 25 MB.

But for the rest then as usual there are tradeoffs.

config    browser benefit    browser benefit    througput
           keep alive         keep alive
           within page        across pages
    B          yes                yes               low
    C          no                 no                acceptable
    D          yes                no                almost acceptable

I consider 100 req/sec as acceptable. Good would be 200-300 which
is what Quercus can do and the exterpolation from:
     (througput PHP Apache / throughput static Apache) * throughput 
static OSU

I suspect that most will find D attractive.

Arne


More information about the Info-vax mailing list