httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Bell <>
Subject Re: [users@httpd] How does Prefork work?
Date Thu, 28 May 2009 17:44:36 GMT
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.
[ ]

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message