Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • ansible/roles/apache
1 result
Select Git revision
Show changes
Commits on Source (1)
# Optimize configuration for Apache and PHP FPM
Credit: [@sbuckpesch](https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534)
Run `ps_mem.py` on you host and collect the values for apache and php-fpm processes.
The, download the [apache_performance.xlsx](apache_performance.xlsx) spreadsheet, fill in the orange fields for your specific server and configure the green calculated values into the Ansible inventory for your host:
```
apache_mpm_prefork:
startservers: 40
serverlimit: 11267
minspareservers: 5
maxspareservers: 10
maxrequestworkers: 11267
maxconnectionsperchild: 0
php_fpm_max_children: 3338
php_fpm_start_servers: 160
php_fpm_min_spare_servers: 80
php_fpm_max_spare_servers: 160
php_fpm_max_requests: 20000
```
Then roll-out the configuration to the host.
You find all the details in the [full documentation](https://devops-tools.docs.lakedrops.com/ansible/roles/apache/).