Re: How does Prefork work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux