List Info

Thread: Understanding the APACHE 1.3 process model




Understanding the APACHE 1.3 process model
country flaguser name
Australia
2007-09-27 21:39:01
Hi Folks,

I'm trying to clarify my understanding of the APACHE 1.3
process model
on Solaris UNIX.

As I understand, "Apache 1.3 on UNIX is a pre-forking
process per
request server". This means that Apache effectively
needs 1 HTTP process
per 1 concurrently connected client. For example, if
[StartServers 5] is
set in httpd.conf, Apache starts with 6 HTTPD processes (5
childs + 1
parent). If there were 20 concurrently connected clients,
then there
would be 21 HTTPD processes.

Firstly, is this correct understanding?

If so, my next question is thus:

What constitutes a "concurrently connected
client"? At a moment in time,
if I run the following netstat command on a Solaris
machine:

netstat -P tcp -n | grep ".80 " | grep -v
TIME_WAIT | wc -l

I get '45', which is constituted as follows, with the
following TCP
statuses:

23 x ESTABLISHED
1  x FIN_WAIT_1
20 x FIN_WAIT_2
1  x LAST_ACK
--
45

However, if I count the number of HTTPD processes at this
same point in
time per '/usr/ucb/ps -auxww | grep httpd | wc -l', I get
'35'.

Therefore, either my first premise above is wrong...or I am
not
measuring the number of 'concurrently connected clients'
accurately.

Any enlightenment will be appreciated.

Cheers, Craig

************************************************************
************
The information in this email together with any attachments
is
intended only for the person or entity to which it is
addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this email message is prohibited,
unless
as a necessary part of Departmental business.
If you have received this message in error, you are asked
to
inform the sender as quickly as possible and delete this
message
and any copies of this message from your computer and/or
your
computer system network.
************************************************************
************


------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribehttpd.apache.org
   "   from the digest: users-digest-unsubscribehttpd.apache.org
For additional commands, e-mail: users-helphttpd.apache.org


Re: Understanding the APACHE 1.3 process model
user name
2007-09-27 21:51:21
you likely have 23 established connections using server
processes and  
an additional number of server processes available to handle
new  
connections. Apache keeps some number of processes available
so that  
it doesn't have to fork the process at the time the request
is made,  
but instead has the process ready to go. There are
httpd.conf  
parameters to specify the minimum and maximum of these to
keep  
available.

--
Michael Conlen

On Sep 27, 2007, at 10:39 PM, Robinson Craig wrote:

> Hi Folks,
>
> I'm trying to clarify my understanding of the APACHE
1.3 process model
> on Solaris UNIX.
>
> As I understand, "Apache 1.3 on UNIX is a
pre-forking process per
> request server". This means that Apache
effectively needs 1 HTTP  
> process
> per 1 concurrently connected client. For example, if
[StartServers  
> 5] is
> set in httpd.conf, Apache starts with 6 HTTPD processes
(5 childs + 1
> parent). If there were 20 concurrently connected
clients, then there
> would be 21 HTTPD processes.
>
> Firstly, is this correct understanding?
>
> If so, my next question is thus:
>
> What constitutes a "concurrently connected
client"? At a moment in  
> time,
> if I run the following netstat command on a Solaris
machine:
>
> netstat -P tcp -n | grep ".80 " | grep -v
TIME_WAIT | wc -l
>
> I get '45', which is constituted as follows, with the
following TCP
> statuses:
>
> 23 x ESTABLISHED
> 1  x FIN_WAIT_1
> 20 x FIN_WAIT_2
> 1  x LAST_ACK
> --
> 45
>
> However, if I count the number of HTTPD processes at
this same  
> point in
> time per '/usr/ucb/ps -auxww | grep httpd | wc -l', I
get '35'.
>
> Therefore, either my first premise above is wrong...or
I am not
> measuring the number of 'concurrently connected
clients' accurately.
>
> Any enlightenment will be appreciated.
>
> Cheers, Craig
>
>
************************************************************
********** 
> **
> The information in this email together with any
attachments is
> intended only for the person or entity to which it is
addressed
> and may contain confidential and/or privileged
material.
> Any form of review, disclosure, modification,
distribution
> and/or publication of this email message is prohibited,
unless
> as a necessary part of Departmental business.
> If you have received this message in error, you are
asked to
> inform the sender as quickly as possible and delete
this message
> and any copies of this message from your computer
and/or your
> computer system network.
>
************************************************************
********** 
> **
>
>
>
------------------------------------------------------------
---------
> The official User-To-User support forum of the Apache
HTTP Server  
> Project.
> See <URL:http://htt
pd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribehttpd.apache.org
>    "   from the digest:
users-digest-unsubscribehttpd.apache.org
> For additional commands, e-mail: users-helphttpd.apache.org
>


------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribehttpd.apache.org
   "   from the digest: users-digest-unsubscribehttpd.apache.org
For additional commands, e-mail: users-helphttpd.apache.org


Re: Understanding the APACHE 1.3 process model
country flaguser name
United States
2007-09-27 22:00:31
On Sep 27, 2007, at 7:51 PM, Michael Conlen wrote:

> you likely have 23 established connections using server
processes  
> and an additional number of server processes available
to handle  
> new connections. Apache keeps some number of processes
available so  
> that it doesn't have to fork the process at the time
the request is  
> made, but instead has the process ready to go. There
are httpd.conf  
> parameters to specify the minimum and maximum of these
to keep  
> available.

See MinSpareServers, MaxSpareServers.

The TIME_WAIT, FIN_WAIT_1, FIN_WAIT_2 and LAST_ACK sockets
should not  
be attached to httpd children.

httpd doesn't deal with the TCP layer, it deals with socket
file  
descriptors.

S.

-- 
Sander Temme
sctemmeapache.org
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )