From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 7 13:02:18 2006 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3601C16A415 for ; Tue, 7 Nov 2006 13:02:18 +0000 (UTC) (envelope-from kevin@unixsite.net) Received: from unixsite.net (d192-24-54-161.try.wideopenwest.com [24.192.161.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11E1743D75 for ; Tue, 7 Nov 2006 13:02:13 +0000 (GMT) (envelope-from kevin@unixsite.net) Received: from [192.168.0.1] (unixsite.net [192.168.0.1]) by unixsite.net (8.13.6/8.13.6) with ESMTP id kA7D2TEW074746 for ; Tue, 7 Nov 2006 08:02:29 -0500 (EST) (envelope-from kevin@unixsite.net) Message-ID: <455083E5.1010705@unixsite.net> Date: Tue, 07 Nov 2006 08:02:29 -0500 From: "Kevin Curtis, Jr." User-Agent: Thunderbird 1.5 (X11/20061018) MIME-Version: 1.0 To: freebsd-bugs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: misc/104859: rpc.statd immediately allocates 256 million bytes of memory upon invocation X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 13:02:18 -0000 Kriston, I noticed the same issue and did some research. Read the following excerpt from http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/book.html#STATD-MEM-LEAK 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. For convenience, rpc.statd maps an obscene amount of memory into its address space. 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. Sincerely, Kevin Curtis, Jr.