httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CrystalCracker <sudarshan.acha...@gmail.com>
Subject Re: [users@httpd] How does Prefork work?
Date Thu, 28 May 2009 19:55:51 GMT

Thanks a lot for the response.

I will do some ab and siege tests to verify it, but I am trying to
conceptually understand it first. 

<IfModule prefork.c>
StartServers         5
MinSpareServers   5
MaxSpareServers  20   
MaxClients            250
MaxRequestsPerChild  4000
</IfModule>

I have at least 20 active apache threads (ps -ef | grep httpd), average is
about 40 threads and goes upto 70 at the peak. Does the above setting sounds
resonable? 




Doug Bell-4 wrote:
> 
> On May 27, 2009, at 11:14 PM, CrystalCracker wrote:
> 
>>
>> Can anyone explain me how exactly prefork works?
>>
>> StartServers 2
>> MaxClients 150
>> MinSpareThreads 25
>> MaxSpareThreads 75
>> ThreadsPerChild 25
>> ServerLimit 16
> 
> Prefork works by spawning one process to handle one connection. So  
> here, Apache can spawn a maximum of 150 httpd processes (MaxClients is  
> maximum number of concurrent connections, which in prefork works out  
> to number of processes).
> 
>> I think I got confused between the terms - server, process and  
>> thread. If
>> prefork is a single thread process, what does that ThreadsPerChild  
>> mean for
>> prefork?
> 
> Prefork is not threaded, so the thread config values do not apply.
> 
>> Lets say, I wan't to support 250 active sessions logged into my
>> site, what would be a tentative settings to meet the load?
> 
> 
> "Active sessions" is difficult to measure. Let's say a person requests  
> a page which takes 10 seconds, then looks at it for 20 seconds (on  
> average). This means that you need one httpd process for three users  
> (the other two people using the 20 seconds the first user isn't using).
> 
> So to get 250 users from these assumptions, we need MaxClients 74.
> 
> I would use "siege" to measure your performance. It has settings for  
> how many concurrent users, and can attempt to simulate randomness and  
> "user is reading the page" time.
> 
> Doug Bell -- Senior Developer, Plain Black Corp.
> [ http://plainblack.com ]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-does-Prefork-work--tp23754946p23768888.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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


Mime
View raw message