I am bit worried about the number of processes on my server. I see plenty apache and mysql processes after a reboot. I am worried they will start eating up too much resources and bring the server down. Is this the default config for apache and mysql? I did not mess with config files at all. Should I consider setting the number of child processes for each in their respective config? 
- 121
1 Answers
The default Apache config is very generic. It spawns a number of child processes for resilience but it does not know anything of your use case. Apache recommends you tune the number of workers to avoid swapping that is detrimental to performance:
A webserver should never ever have to swap, as swapping increases the latency of each request beyond a point that users consider "fast enough". This causes users to hit stop and reload, further increasing the load. You can, and should, control the MaxRequestWorkers setting so that your server does not spawn so many children that it starts swapping.
MySQL generally starts with a single process, so I am surprised to see that many. You may want to check how many are running on startup, to see if it created the extra processes in response to a certain workload. There is probably a config to control that but I don't know that one.
- 3,387