From owner-freebsd-doc Sat Feb 24 0:50: 8 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id DF55637B65D for ; Sat, 24 Feb 2001 00:50:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1O8o1v67158; Sat, 24 Feb 2001 00:50:01 -0800 (PST) (envelope-from gnats) Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id B3D7D37B401 for ; Sat, 24 Feb 2001 00:44:20 -0800 (PST) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 48A3A3E02 for ; Sat, 24 Feb 2001 00:44:20 -0800 (PST) Received: (from dima@localhost) by hornet.unixfreak.org (8.11.1/8.11.1) id f1O8iJV15773; Sat, 24 Feb 2001 00:44:20 -0800 (PST) (envelope-from dima) Message-Id: <200102240844.f1O8iJV15773@hornet.unixfreak.org> Date: Sat, 24 Feb 2001 00:44:20 -0800 (PST) From: dima@unixfreak.org Reply-To: dima@unixfreak.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/25340: [PATCH] New FAQ entry about rpc.statd(8) appearing to use 256MB of memory Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25340 >Category: docs >Synopsis: [PATCH] New FAQ entry about rpc.statd(8) appearing to use 256MB of memory >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 24 00:50:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Dima Dorfman >Release: FreeBSD 4.2-20010102-STABLE i386 >Organization: Private >Environment: Not relevant. >Description: rpc.statd(8) maps 256MB into its address space to facilitate status file growth. This makes it look like it's using all that memory, which often causes concern when the average user (or admin) runs top(1) or ps(1). >How-To-Repeat: Read -questions. >Fix: Apply the following patch to doc/en_US.ISO_8859-1/books/faq/book.sgml. Index: book.sgml =================================================================== RCS file: /st/src/FreeBSD/doc/en_US.ISO_8859-1/books/faq/book.sgml,v retrieving revision 1.144 diff -u -r1.144 book.sgml --- book.sgml 2001/02/17 01:07:43 1.144 +++ book.sgml 2001/02/23 23:42:37 @@ -6795,6 +6795,30 @@ &man.rc.conf.5; man page for more information on rc.conf. + + + + There is a memory leak in &man.rpc.statd.8;! It is using + 256 Mbytes of memory! + + + + No, there is no memory leak, and it's 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 &man.top.1; and + &man.ps.1;. + + &man.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 generious size. This is very evident from the source + code, where one can see that the length argument to &man.mmap.2; + is 0x10000000, or one sixteenth of the + address space on an IA32, or exactly 256MB. + + >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message