From owner-freebsd-hackers Fri Oct 6 9:45:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 2D7A637B502 for ; Fri, 6 Oct 2000 09:45:40 -0700 (PDT) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id e96Gjc610091; Fri, 6 Oct 2000 09:45:38 -0700 Date: Fri, 6 Oct 2000 09:45:37 -0700 From: Brooks Davis To: Peter Pentchev Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: weird rpc.statd memory behavior Message-ID: <20001006094537.A9865@Odin.AC.HMC.Edu> References: <20001006154359.C232@ringwraith.office1.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20001006154359.C232@ringwraith.office1.bg>; from roam@orbitel.bg on Fri, Oct 06, 2000 at 03:43:59PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Oct 06, 2000 at 03:43:59PM +0300, Peter Pentchev wrote: > On a RELENG_4 machine with the world rebuilt on Sep 27, 'top' gave me > the following output after sorting by the 'SIZE' field.. > > last pid: 424; load averages: 0.17, 0.15, 0.10 up 0+00:29:43 15:39:23 > 46 processes: 1 running, 45 sleeping > CPU states: 4.7% user, 0.0% nice, 1.2% system, 3.1% interrupt, 91.1% idle > Mem: 19M Active, 202M Inact, 40M Wired, 80K Cache, 61M Buf, 240M Free > Swap: 512M Total, 512M Free > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 125 root 2 0 257M 560K select 0:00 0.00% 0.00% rpc.statd > 244 mysql -2 0 12180K 11172K getblk 1:14 5.47% 5.47% mysqld > 411 root 2 0 2116K 1580K select 0:00 0.00% 0.00% sshd > 269 root 2 0 2116K 1580K select 0:00 0.00% 0.00% sshd > [snip more processes] > > Aaaaaall right then.. what's the deal? :) Yes, I know that those 257 > megabytes are not *really* used, allocated, hogged and so on.. but why > does statd ask for so much? :) And that's just 29 minutes after a reboot :) Use The Source Luke. Taking a quick look at the source memory is only allocated in two places. On malloc which doesn't account for this and one f*ing hugh mmap of a file in /var to allow for extension of the file. The code in -current mmaps 0x10000000 bytes of address space or exactly 256MB. This is compleatly harmless as it not only doesn't use any real memory, but since it's mmaping a file in /var it doesn't use any swap either. Check it out for your self at: /usr/src/usr.sbin/rpc.statd -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message