From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 18:20:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A20D316A4CE for ; Sat, 2 Oct 2004 18:20:29 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BEC643D1F for ; Sat, 2 Oct 2004 18:20:29 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-67-124-49-205.dsl.snfc21.pacbell.net [67.124.49.205])i92IIcCE023633; Sat, 2 Oct 2004 14:18:48 -0400 Message-ID: <415EF0F4.9060409@elischer.org> Date: Sat, 02 Oct 2004 11:18:28 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Jan Srzednicki References: <20041002114846.GA23339@miranda.expro.pl> In-Reply-To: <20041002114846.GA23339@miranda.expro.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Wired memory monitoring X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2004 18:20:29 -0000 Jan Srzednicki wrote: > Hello, > > I am investigating some VM issues on FreeBSD. I have noticed that wired > memory grows quite rapidly on forking lots of processes. After those > processes exit, it drops a bit, but still can use about 100MB after > launching 3000 processes. I think it's not a leak, as subsequent forks > don't cause it to grow noticeably. > > I'm rather curious what eats all that memory. sysctl vm.zone shows some > high values, but they're are not high in memory usage terms, even > considering 50% (or so) efficiency of the slab allocator. > > The question is, are there any other memory inspecting tools that would > allow me to see where is all that wired memory? And, are there any ways > to control it's behaviour (eg. to free unused per-process structures and > data)? > > greetings, Every thread allocated only shows the thread structure in the zone stats but there is a 3 page stack allocated with it too which doesn't show up there.