From owner-freebsd-questions@FreeBSD.ORG Mon Dec 1 15:34:39 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74D6516A4CE for ; Mon, 1 Dec 2003 15:34:39 -0800 (PST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F60B43FBF for ; Mon, 1 Dec 2003 15:34:29 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 97409 invoked by uid 1001); 1 Dec 2003 23:34:27 -0000 Date: Tue, 2 Dec 2003 00:34:26 +0100 From: Erik Trulsson To: DG Message-ID: <20031201233426.GA97392@falcon.midgard.homeip.net> Mail-Followup-To: DG , freebsd-questions@freebsd.org References: <20031201204611.GN15894@npkfbsd> <006301c3b850$aeb8ffc0$5401a8c0@borg.fielden.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006301c3b850$aeb8ffc0$5401a8c0@borg.fielden.com.au> User-Agent: Mutt/1.5.5.1i cc: freebsd-questions@freebsd.org Subject: Re: size of rpc.statd process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2003 23:34:39 -0000 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. -- Erik Trulsson ertr1013@student.uu.se