Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2003 18:15:31 -0400
From:      Jesse Guardiani <jesse@wingnet.net>
To:        freebsd-questions@freebsd.org
Subject:   `top` process memory usage: SIZE vs RES
Message-ID:  <bjqs64$6i9$1@sea.gmane.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bjqs64$6i9$1>