From owner-freebsd-questions@FreeBSD.ORG Fri Sep 5 10:24:16 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 EF8E116A4BF for ; Fri, 5 Sep 2003 10:24:16 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D81543FEC for ; Fri, 5 Sep 2003 10:24:14 -0700 (PDT) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19vKK9-00043Z-00 for ; Fri, 05 Sep 2003 19:24:41 +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 19vKK8-00043R-00 for ; Fri, 05 Sep 2003 19:24:40 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19vKJf-0000eF-00 for ; Fri, 05 Sep 2003 19:24:11 +0200 From: Jesse Guardiani Date: Fri, 05 Sep 2003 13:24:10 -0400 Organization: WingNET Lines: 35 Message-ID: References: <20030904124052.GD88888@happy-idiot-talk.infracaninophile.co.uk> <20030905143952.GA79611@happy-idiot-talk.infracaninophile.co.uk> 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: Re: process memory peak recording 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: Fri, 05 Sep 2003 17:24:17 -0000 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