Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61ACB463F for ; Thu, 19 May 2011 22:33:55 +0000 (UTC) Received: (qmail 74335 invoked by uid 500); 19 May 2011 22:33:52 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 74305 invoked by uid 500); 19 May 2011 22:33:52 -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 74297 invoked by uid 99); 19 May 2011 22:33:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2011 22:33:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pharesm@gmx.com designates 213.165.64.42 as permitted sender) Received: from [213.165.64.42] (HELO mailout-eu.gmx.com) (213.165.64.42) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 May 2011 22:33:43 +0000 Received: (qmail 16704 invoked by uid 0); 19 May 2011 22:33:22 -0000 Received: from 78.86.120.96 by rms-eu013.v300.gmx.net with HTTP Content-Type: multipart/alternative; boundary="========GMXBoundary35591305844401656130" Date: Thu, 19 May 2011 22:33:21 +0000 From: pharesm@gmx.com Message-ID: <20110519223321.35590@gmx.com> MIME-Version: 1.0 To: users@httpd.apache.org X-Authenticated: #66334894 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 X-GMX-UID: hajieo50bGInLddGmWdnlgFvcmZ1Zlx7 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Questions on worker RSS usage and setting MaxClients --========GMXBoundary35591305844401656130 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi, I have the task of reviewing httpd settings, in particular, for 'MaxClients' . The server I am looking at has both worker and prefork running (on different ports for different jobs). For worker MPM, the config had been set by a previous admin to have 5000 MaxClients with ServerLimit of 50 and ThreadsPerChild of 100. It will start all 50 servers on startup (StartServers), so there is a pool of 5000 workers immediately available. The server itself has 12GB of RAM and 8 hyperthreaded 2.93 Ghz cores. I have been examining RSS of each httpd worker child process, and I noticed that the size varies quite a bit. The first 10 or so httpd processes use between 20 to 100MB of resident memory, whereas the rest use about 11MB. There are around 600 workers in use actively serving connections (from server-status), so I assume that the child processes with the higher resident mem counts are those that are actively serving clients. Am I also correct in assuming, for maximum memory efficiency , that httpd tends to serve clients from one child until that child has used all its threads before serving from another child process? Anyway, if the foregoing assumptions are correct, my guess is that if each child was busy, it would have an RSS of around 100MB, and so with 50 children with 100 active threads each serving a connection, that should make around 5GB maximum. On the other hand, the prefork processes use around 10MB each, so I am thinking I could go to 500 MaxClients, leaving around 2GB for the OS and other sundry processes on the same host. Sound reasonable? Cheers, -Cam --========GMXBoundary35591305844401656130 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi,
=20
=20 I have the task of reviewing httpd settings, in particular, for 'MaxClients= '
. The server I am looking at has both worker and prefork runnin= g (on different ports for different jobs). For worker MPM, the config had b= een set by a previous admin to have 5000 MaxClients with ServerLimit of 50 = and ThreadsPerChild of 100. It will start all 50 servers on startup (StartS= ervers), so there is a pool of 5000 workers immediately available. The serv= er itself has 12GB of RAM and 8 hyperthreaded 2.93 Ghz cores. I h= ave been examining RSS of each httpd worker child process, and I noticed th= at the size varies quite a bit. The first 10 or so httpd processes use betw= een 20 to 100MB of resident memory, whereas the rest use about 11MB. There = are around 600 workers in use actively serving connections (from server-sta= tus), so I assume that the child processes with the higher resident mem cou= nts are those that are actively serving clients. Am I also correct in assum= ing, for maximum memory efficiency, that httpd tends to serve clients from = one child until that child has used all its threads before serving from ano= ther child process? Anyway, if the foregoing assumptions are correct, my gu= ess is that if each child was busy, it would have an RSS of around 100MB, a= nd so with 50 children with 100 active threads each serving a connection, t= hat should make around 5GB maximum. On the other hand, the prefork processe= s use around 10MB each, so I am thinking I could go to 500 MaxClients, leav= ing around 2GB for the OS and other sundry processes on the same host.
=20
=20 Sound reasonable?
=20
=20 Cheers,
=20
=20 -Cam

=20

=20 =C2=A0

=20
=20  
--========GMXBoundary35591305844401656130--