I've a site running Magento on the following setup:
- Apache 2.4 with mpm_worker
- Total RAM in server: 14GB (10GB avilable to Apache/PHP)
Each PHP-FPM process consumes approximately 80MB of RAM.
I want to fine tune the settings for PHP-FPM and mpm_worker. Reading in the documentation I'm a bit confused about the relation between options in PHP-FPM and mpm_worker.
E.g., PHP-FPM has configurations:
max_children. I understand what these options mean with respect to PHP-FPM.
However, mpm_worker has the following configurations:
ThreadLimit. Again, isolated to mpm_worker I understand what they do.
My question is: How does these configurations relate to each other? Let's say I set
ThreadsPerChild=25. This would give me 50 threads to begin with with respect to Apache/mpm_worker. If I then set
pm.start_servers = 50, PHP-FPM will spawn 50 processes initially.
So what is the relationship between these 50 "Apache" threads and 50 "PHP-FPM" processes? Does each Apache thread utilize one PHP-FPM process?
I hope someone can give some insight into this.