process memory peak recording

Jesse Guardiani jesse at wingnet.net
Fri Sep 5 10:24:17 PDT 2003


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




More information about the freebsd-questions mailing list