Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Oct 2000 09:45:37 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: weird rpc.statd memory behavior
Message-ID:  <20001006094537.A9865@Odin.AC.HMC.Edu>
In-Reply-To: <20001006154359.C232@ringwraith.office1.bg>; from roam@orbitel.bg on Fri, Oct 06, 2000 at 03:43:59PM %2B0300
References:  <20001006154359.C232@ringwraith.office1.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001006094537.A9865>