From owner-freebsd-questions@FreeBSD.ORG Thu Sep 11 15:15:35 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 683D816A4BF for ; Thu, 11 Sep 2003 15:15:35 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40CFE43FF7 for ; Thu, 11 Sep 2003 15:15:34 -0700 (PDT) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19xZiq-0004Hb-00 for ; Fri, 12 Sep 2003 00:15:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19xZip-0004HT-00 for ; Fri, 12 Sep 2003 00:15:27 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19xZiu-0001kZ-00 for ; Fri, 12 Sep 2003 00:15:32 +0200 From: Jesse Guardiani Date: Thu, 11 Sep 2003 18:15:31 -0400 Organization: WingNET Lines: 64 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org User-Agent: KNode/0.7.2 X-Mail-Copies-To: never Sender: news Subject: `top` process memory usage: SIZE vs RES X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jesse@wingnet.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2003 22:15:35 -0000 Howdy list, I checked the FAQ and the questions archive before I posted this, so hopefully it isn't a frequently asked question: Background: ============= I am stress testing a FreeBSD 4.7-RELEASE server (it's a pre- production test server) by sending huge email messages to it via SMTP. I'm running qmail-1.03 built from source, with the QMAILQUEUE patch, qmail-qfilter, a custom Python script that runs under qmail-qfilter, and qmail-scanner with ClamAV. I test the server by sending a 59M or a 99M email from a remote machine (connected via fxp0). Please, spare me the gaggle about 59M emails being too large. I am perfectly aware of the silliness associated with sending a 59M file via SMTP. I'm only interested in stress testing this server right now. Thanks! Now please read on: The Situation: ================== As I watch the email travel down the qmail-smtpd->qmail-qfilter-> custom-python->qmail-scanner->clamd->qmail-queue "pipeline", I watch the memory usage with `top`. Memory is critical in this type of application, since I run my qmail-smtpd "pipeline" under DJB's softlimit program. I MUST know how much memory to allocate for the upper limit of each pipeline, otherwise qmail-smtpd will terminate the transfer with a 451 SMTP error. Anyway, as I watch `top`, I never see more than 15M being used by the various pipeline programs at any given point in time, but my Free Memory constantly declines until it reaches about 526k. The Questions: ========================== 1.) Where is my Free memory going? I can't account for it in the SIZE and RES columns of the various processes. These are relatively constant. 2.) What, exactly, is RES? `man top` describes it as this: "RES is the current amount of resident memory", but does that mean RES is included in SIZE? Or does that mean that RES should be counted in addition to SIZE? Thanks! -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net