why are there many httpd process on the machine while i only started one apache httpd service?

on a linux machine with apache installed, i did a search for httpd by ps -ef | grep httpd,

i saw about 10 httpd processes, why is that?

myuser  14732     1  0 Jan12 ?        00:00:10 /home/myuser/webserver/bin/httpd -k start
myuser  14736 14732  0 Jan12 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start
myuser  31309 14732  0 Jan14 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start
myuser  31313 14732  0 Jan14 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start

thx.


Solution 1:

You started the parent, and the parent started the worker children.

Solution 2:

You might want to read up Apaches Documentation on MPM. This is the definitive guide. I'd also recommend reading up on how Unix Daemons work in general.

Long story (naive) and short:

  • You have a "controlling" process
  • Each "worker" process handles a client