size of rpc.statd process

Erik Trulsson ertr1013 at student.uu.se
Mon Dec 1 15:34:39 PST 2003


On Tue, Dec 02, 2003 at 08:18:35AM +1100, DG wrote:
> Greetings,
> 
> I have a 5.1-RELEASE installation running as a NFS server for a Linux client
> and another FreeBSD client.  I haven't done anything unusual that I am aware
> of when setupping the share, however looking at the output from top shows
> the following for rpc.statd:
> 
>   PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
>   359 root      96    0   257M    80K select   0:01  0.00%  0.00% rpc.statd
> 
> The SIZE is 257M (this is on a maching with 128M RAM and 1G swap) - that
> seems rather high.  The handbook says that it could occupy a lot of memory
> with a lot of clients, but for only 2 clients?
> 
> Is this of concern and, if so, how would I correct it?

This is answered in the FAQ:

 10.25. Why is rpc.statd using 256 megabytes of memory?

  No, there is no memory leak, and it is not using 256 Mbytes of
  memory. It simply likes to (i.e., always does) map an obscene amount
  of memory into its address space for convenience. There is nothing
  terribly wrong with this from a technical standpoint; it just throws
  off things like top(1) and ps(1).

  rpc.statd(8) maps its status file (resident on /var) into its address
  space; to save worrying about remapping it later when it needs to
  grow, it maps it with a generous size. This is very evident from the
  source code, where one can see that the length argument to mmap(2) is
  0x10000000, or one sixteenth of the address space on an IA32, or
  exactly 256MB.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list