Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache2 sensible prefork tuning #116

Merged
merged 3 commits into from Jun 16, 2014

Conversation

@AntJanus
Copy link
Contributor

commented Apr 1, 2014

Todo:

  • initial rewrite
  • change if/else loops
  • testing

Resolving: #89

AntJanus added 2 commits Mar 31, 2014
@AntJanus

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2014

On a 2gb machine:

    <IfModule mpm_prefork_module>
        StartServers          10
        MinSpareServers       8
        MaxSpareServers       15
        MaxClients            25
        ServerLimit           25
        MaxRequestsPerChild   1000
    </IfModule>

On a 1gb machine:

    <IfModule mpm_prefork_module>
        StartServers          3
        MinSpareServers       3
        MaxSpareServers       3
        MaxClients            10
        ServerLimit           10
        MaxRequestsPerChild   1000
    </IfModule>

On anything lower:

    <IfModule mpm_prefork_module>
        StartServers          3
        MinSpareServers       3
        MaxSpareServers       3
        MaxClients            5
        ServerLimit           5
        MaxRequestsPerChild   1000
    </IfModule>
@AntJanus

This comment has been minimized.

Copy link
Contributor Author

commented on provisioning/roles/common/templates/prefork.conf in dfce8ec Apr 1, 2014

Anyone who stumbles on this. When you get 2gb of RAM or 2048mb, depending on the host, you will get a lower value. 2000 should catch any normal 2gb VPS, while 900 should catch any normal 1gb VPS.

@AntJanus AntJanus changed the title [WIP] Apache2 sensible prefork tuning [RFC] Apache2 sensible prefork tuning Apr 1, 2014
@EvanK

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2014

👍

@ericclemmons

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2014

@mcheck Whatcha think?

@mcheck

This comment has been minimized.

Copy link

commented Apr 1, 2014

Perfect. For a 1G machine, that seems very reasonable.
Especially considering my apache PHP instances were ~62M and I ended up with MaxClients around 14.

@AntJanus

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2014

@mcheck I wanted to be a bit on the conservative side so that everyone wins.

@ericclemmons I'm thinking of making a write-up to explain how to tune apache so that any future users can access it as a guide to making their custom changes to the provisioning. What do you think?

@mcheck

This comment has been minimized.

Copy link

commented Apr 1, 2014

@AntJanus I think a guide would be great. As a related side note, I added swap to my vps that wasn't in the provisioning (not sure that it could have been) and changed the swappiness to 10 in order to provide protection from memory full issues that might arise from bad apache (or other) processes.

@ericclemmons ericclemmons added this to the v0.2.51 milestone Jun 12, 2014
@ericclemmons ericclemmons changed the title [RFC] Apache2 sensible prefork tuning Apache2 sensible prefork tuning Jun 16, 2014
ericclemmons added a commit that referenced this pull request Jun 16, 2014
Apache2 sensible prefork tuning
@ericclemmons ericclemmons merged commit adcd28a into master Jun 16, 2014
1 check failed
1 check failed
default The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.