Skip to content

Provisioning apache2 prefork replacement killed my server(s) performance #89

@mcheck

Description

@mcheck

One thing I have been chasing after for several weeks now, is the performance of apache and varnish. Turns out where I was looking at varnish being so finicky, it was apache2 when the changes from @EvanK were merged into master at (I think) 0.2.29.

When the prefork.conf file was broken out to determine values from calculations, my 1G server provisioning performance was horrendous. 30s to load a jquery file. Once I isolated and found that it was the prefork settings, I changed them to those set with a version BEFORE 0.2.29 and performance was restored.

I'm no ansible or apache2 expert, so I can't understand why less requests per child will give better results. But overall, I can tell you the results is that prefork.conf 1 is TERRIBLE compared to prefork 2, below.

So, 1G server (as well as other current settings) with 0.2.29 and later:

prefork.conf (TERRIBLE performance) on 1G server

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
     StartServers          2
     MinSpareServers       2
     MaxSpareServers       3
     MaxClients            1
     ServerLimit           1
    MaxRequestsPerChild   1000
</IfModule>

So, 1G server (as well as other current settings) with 0.2.28 and earlier:

prefork.conf (great/expected performance) on 1G server

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions