I am willing to shift my application server from default prefork MPM module to worker MPM. My server configuration is

OS - CentOS 6 Apache - Apache/2.2.15 (Unix) PHP 5.4.35 (fpm-fcgi) CPU - 4 RAM - 8 GB

I am only considering 60% RAM available i.e. 5GB. My apache process takes average 6 MB and php-fpm takes 25 MB.So based on RAM consumption I have following configurations

Worker Configuration:

Timeout 60 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15

ServerLimit 16 StartServers 4 MaxClients 400 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0

PHP-FPM Configuration

pm.max_children = 100 pm.start_servers = 10 pm.min_spare_servers = 5 pm.max_spare_servers = 15 pm.max_requests = 500

emergency_restart_threshold = 10 emergency_restart_interval = 1m process_control_timeout = 5s

When I add this machine to clusture the load average goes high upto 100 and behaves very strange.

Any help or suggestion would be greatly appreciated if I am doing any wrong configuration.



This is probably not the answer you are looking for, but still. If you are really concerned about the effective memory consuming and performance, you should really consider moving to nginx + php-fpm, since you are already using the latter. Instead of switching to another apache process model.

Apache is memory-consuming and slow. At least give nginx a chance.

  • How would you go about transitioning from Apache to nginx? – Ben Feb 16 '15 at 20:24
  • Easily. I'd write new config and just launched it. – drookie Feb 17 '15 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.