Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 1134 invoked from network); 28 May 2009 20:06:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 20:06:17 -0000 Received: (qmail 57831 invoked by uid 500); 28 May 2009 19:56:23 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 57818 invoked by uid 500); 28 May 2009 19:56:23 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 57809 invoked by uid 99); 28 May 2009 19:56:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 19:56:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 19:56:12 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1M9lhf-0006qV-O6 for users@httpd.apache.org; Thu, 28 May 2009 12:55:51 -0700 Message-ID: <23768888.post@talk.nabble.com> Date: Thu, 28 May 2009 12:55:51 -0700 (PDT) From: CrystalCracker To: users@httpd.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sudarshan.acharya@gmail.com References: <23754946.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] How does Prefork work? 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. StartServers 5 MinSpareServers 5 MaxSpareServers 20 MaxClients 250 MaxRequestsPerChild 4000 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 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 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