From owner-freebsd-current@FreeBSD.ORG Tue Jan 15 13:56:20 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1D5CE3D9; Tue, 15 Jan 2013 13:56:20 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id CD1DC99D; Tue, 15 Jan 2013 13:56:19 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Tv74T-0002Bc-8c; Tue, 15 Jan 2013 18:00:57 +0400 Date: Tue, 15 Jan 2013 18:00:57 +0400 From: Slawa Olhovchenkov To: David Chisnall Subject: Re: [PATCH] Add rusage reporting to procstat Message-ID: <20130115140057.GA67643@zxy.spb.ru> References: <201301141639.17783.jhb@freebsd.org> <20130115134735.GA7708@zxy.spb.ru> <8815BAF7-3B4C-4EBD-A332-AF58BE644DDF@theravensnest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8815BAF7-3B4C-4EBD-A332-AF58BE644DDF@theravensnest.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 13:56:20 -0000 On Tue, Jan 15, 2013 at 01:49:01PM +0000, David Chisnall wrote: > On 15 Jan 2013, at 13:47, Slawa Olhovchenkov wrote: > > > maximum RSS -- 3328 _bytes_? You kidding. > > I think this is a bug in our getrusage. I've seen similar (<4KB) > things in a program that mmap()s 12KB of input, allocates a load of > heap memory for metadata, uses a bunch of stack, and then exits. > I find it is quite odd that the figure isn't a multiple of the page > size, because the resident set can't be anything other than an > integer number of pages.. man getrusage ru_maxrss the maximum resident set size utilized (in kilobytes). Dimensions of the other fields may be also wrong.