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
Merged

Apache2 sensible prefork tuning #116

merged 3 commits into from
Jun 16, 2014

Conversation

AntJanus
Copy link
Contributor

@AntJanus AntJanus commented Apr 1, 2014

Todo:

  • initial rewrite
  • change if/else loops
  • testing

Resolving: #89

@AntJanus
Copy link
Contributor Author

AntJanus 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 AntJanus changed the title [WIP] Apache2 sensible prefork tuning [RFC] Apache2 sensible prefork tuning Apr 1, 2014
@EvanK
Copy link
Contributor

EvanK commented Apr 1, 2014

👍

@ericclemmons
Copy link
Contributor

@mcheck Whatcha think?

@mcheck
Copy link

mcheck 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
Copy link
Contributor Author

AntJanus 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
Copy link

mcheck 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
@ericclemmons ericclemmons merged commit adcd28a into master Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants