LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache Service in Top (https://www.linuxquestions.org/questions/linux-server-73/apache-service-in-top-659296/)

carlosinfl 07-30-2008 12:28 PM

Apache Service in Top
 
I noticed that on my Debian email server (Postfix) - my Apache has a lot of entries listed in htop for some strange reason. They all seem to have unique PID's and are identical in resource usage. Everything but the PID is identical so I am wondering what is going on and why so many instances of Apache on my server? Can anyone please explain what is going on based on the screenshot?

Link

trickykid 07-30-2008 12:32 PM

Apache will start several httpd processes to listen and take incoming requests. You can control the number of them in your httpd.conf configuration file.

carlosinfl 07-30-2008 12:48 PM

Quote:

Originally Posted by trickykid (Post 3231183)
Apache will start several httpd processes to listen and take incoming requests. You can control the number of them in your httpd.conf configuration file.

OK so you're saying that this is normal behavior of Apache in Linux. If I reduce the # of sessions it opens, how do I know I wont negatively impacting the performance of the server?

rodeoclown 07-30-2008 02:21 PM

Quote:

Originally Posted by Carlwill (Post 3231204)
OK so you're saying that this is normal behavior of Apache in Linux. If I reduce the # of sessions it opens, how do I know I wont negatively impacting the performance of the server?

Sorry, forced to use my alter ego on the forums for the time being.

Anyways, it's just all a matter of usage of the server itself. From the looks of your link, most of those look like they got spawned due to more incoming requests. The nice thing about apache is you can set a minimum number of servers to start with and then a max number. Keep them reasonable and adjust when necessary.

You can also benchmark your apache server with the ab command that comes with apache. If you have an idea of peak usage time, test it and see how it performs. If it's miserable response times, tweak and adjust and test again.


All times are GMT -5. The time now is 10:15 AM.