Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Sep 2003 13:24:10 -0400
From:      Jesse Guardiani <jesse@wingnet.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: process memory peak recording
Message-ID:  <bjagrr$2ds$1@sea.gmane.org>
References:  <bj5rcl$3r5$4@sea.gmane.org> <20030904124052.GD88888@happy-idiot-talk.infracaninophile.co.uk> <bja53j$52v$2@sea.gmane.org> <20030905143952.GA79611@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote:

> On Fri, Sep 05, 2003 at 10:03:31AM -0400, Jesse Guardiani wrote:

[...]

> Another approach that occurred to me might be feasible would be to use
> the limits(1) facility to set a maximum virtual memory size for the
> process.  Then do a binary search to find the smallest virtualmem
> limit that would still permit the process to complete.  But that
> really only works if you can run the same process with the same
> arguments over and over again and always get the same result each
> time.

Actually, that very situation is what makes me wish I had some way to
quickly pull the peak mem usage of a process. :)

I'm running DJB's softlimit with qmail-smtpd and a bunch of QMAILQUEUE
scripts, and softlimit will OOM qmail-smtpd if any of the processes in
the QMAILQUEUE "pipeline" exceed the alloted mem usage. I usually have
to send 70M messages down the pipeline in order to properly "profile"
memory usage at different points in time. Real pain in the rear. Very
time consuming too.

Oh well, I've practically got it down to an art now.

Thanks anyway!

-- 
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?bjagrr$2ds$1>