Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 May 1999 12:42:38 +1000
From:      Gregory Bond <gnb@itga.com.au>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: rpc.statd was Re: 256MB mail server with 190+MB inactive? 
Message-ID:  <199905070242.MAA09874@lightning.itga.com.au>
In-Reply-To: Your message of Fri, 07 May 1999 04:18:34 %2B0200.

next in thread | raw e-mail | index | archive | help
>  > USER     PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAN=
D
>  > root     133  0.0  0.0 262968    0  ??  IWs  -         0:00.00 (rpc.=
statd)

[...]

> I don't know why it requests that much memory (maybe it makes
> handling the status data easier...  well, you have the source).

rpc.statd uses a status file called /var/db/statd.status.

It mmap's this file into a large region so it can treat it like memory:

src/usr.sbin/rpc.statd/file.c line 153 ff:
	=

  /* File now open.  mmap() it, with a generous size to allow for       *=
/
  /* later growth, where we will extend the file but not re-map it.     *=
/
  status_info =3D (FileLayout *)
    mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, status_fd,=
 0);

Note the second argument (size =3D 0x10000000 i.e. 256Mb), and this comme=
nt
from the mmap(2) man page:
	Any such extension beyond the end of the mapped object will =

	be zero-filled.

Yes, 256Mb is probably a bit extreme - at 1k per host it's got room to mo=
nitor
256k hosts!






To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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