From owner-freebsd-stable@FreeBSD.ORG Sun Oct 14 13:31:19 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2233016A469 for ; Sun, 14 Oct 2007 13:31:19 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: from corpmail.itlegion.ru (corpmail.itlegion.ru [84.21.226.211]) by mx1.freebsd.org (Postfix) with SMTP id 2D9EF13C45A for ; Sun, 14 Oct 2007 13:31:17 +0000 (UTC) (envelope-from matrix@itlegion.ru) Received: (qmail 69060 invoked from network); 14 Oct 2007 17:31:12 +0400 Received: from unknown (HELO Artem) (192.168.0.12) by 84.21.226.211 with SMTP; 14 Oct 2007 17:31:12 +0400 X-AntiVirus: Checked by Dr.Web [version: 4.44, engine: 4.44.0.09170, virus records: 249376, updated: 14.10.2007] Message-ID: <008801c80e66$7be49490$0c00a8c0@Artem> From: "Artem Kuchin" To: Date: Sun, 14 Oct 2007 17:30:55 +0400 Organization: IT Legion MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Subject: Question about 'top' values on memory usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2007 13:31:19 -0000 Hello! Maybe someone with deeper knowledge of the internals of FreeBSD can clean up something for me (any for many others)^ Here are lines from my top: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 9258 hordelo_ru 1 4 0 40992K 4260K accept 0 0:00 0.00% httpd 9257 hordelo_ru 1 44 0 40992K 4296K select 1 0:00 0.00% httpd 9259 hordelo_ru 1 4 0 40992K 4292K select 1 0:00 0.00% httpd As you see, 'size' is the same for all processes, while RES varies. As i understand, the real memory taken by a process is RES and SIZE include a bunch of shares .so libs, so, if more httpd's started each will take only about 4300K more, so, 100 https will take 430000K to run, right? Another question is that is httpd uses threads (as provided by FreeBSD) starting a new thread will or will not copy executable copy and data? Basically, will a new thread eat another 4300K or just a little bit for its data? All this i need to calculate maximum possible number of https i can run on a box with certain amount of memory and select proper MPM for Apache. Somehow, i could not find any practical info on this regarding FreeBSD. Thank you in advance! -- Regards, Artem Kuchin