apache processes

Hi All,
i install and configure apache22 and everything work. But in sockstat view to many processes for apache, is this ok?

Code:
www      httpd      tcp4 6 *:80                
www      httpd      tcp4   *:*             
www      httpd      tcp4 6 *:80              
www      httpd      tcp4   *:*               
www      httpd      tcp4 6 *:80            
www      httpd      tcp4   *:*                 
www      httpd      tcp4 6 *:80           
www      httpd      tcp4   *:*     
www      httpd      tcp4 6 *:80  
www      httpd      tcp4   *:* 
www      httpd      tcp4 6 *:80
www      httpd      tcp4   *:*

And also i want to add some module like mod_mem_cache and else. I try to delete apache22 but it only delete apache22 port not all ports installed with apache.
 
Jeff_8420 said:
Hi All,
i install and configure apache22 and everything work. But in sockstat view to many processes for apache, is this ok?
Yes, that's normal.

And also i want to add some module like mod_mem_cache and else. I try to delete apache22 but it only delete apache22 port not all ports installed with apache.

# pkg_delete -rx apache

See pkg_delete(1)
 
i install and configure apache22 and everything work. But in sockstat view to many processes for apache, is this ok?

Yes, Apache fork(2)s a number of times, each process serves one request, so if you want to serve 4 simultaneous users, then you'll need 4 processes, if you want to serve 16, you'll need 16, etc.

The three most important directives to control the number of forks are: StartServers, MinSpareServers, and MaxSpareServers. See the Apache docs:
http://httpd.apache.org/docs/2.1/mod/prefork.html

Note there are also other ways of handling things, such as threads.
 
Isn't the point of Apache 2.0 and above to use threads instead of processes for each request to increase performance? Why is the default prefork for Unix?
 
Back
Top