From owner-freebsd-current@FreeBSD.ORG Wed Aug 11 15:29:51 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2220016A4D3; Wed, 11 Aug 2004 15:29:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1802943D1F; Wed, 11 Aug 2004 15:29:51 +0000 (GMT) (envelope-from bmilekic@FreeBSD.org) Received: from freefall.freebsd.org (bmilekic@localhost [127.0.0.1]) i7BFTofH017922; Wed, 11 Aug 2004 15:29:50 GMT (envelope-from bmilekic@freefall.freebsd.org) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7BFToS2017921; Wed, 11 Aug 2004 15:29:50 GMT (envelope-from bmilekic) Date: Wed, 11 Aug 2004 15:29:50 +0000 From: Bosko Milekic To: Andre Oppermann , freebsd-current@freebsd.org Message-ID: <20040811152950.GA17794@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Re: UMA questions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2004 15:29:51 -0000 >1. UMA zones do not show up in the output of 'vmstat -m'. Is there a way > to get information on how much memory each UMA zone is using? > Example: "sackhole", "tcptw", ... vmstat -z, or sysctl vm.zone. Be careful when interpreting the stats in the Mbuf, Mbuf Cluster, and Packet zones, because they are special. See www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf if you want to know why, exactly. >2. What does the flag UMA_ZONE_ZINIT do exactly? It initializes zone-allocated objects to zero. This happens as objects are first allocated (i.e., slabs are allocated) and before placement into the slab cache. Unfortunately, I am not sure this works very well unless you also make sure to zero them as they are returned (dtor), which is a shitty model. >3. What does the flag UMA_ZONE_NOFREE prevent exactly? Will it prevent any > zone/slab of this type to be free'd ever again? This way the zone can > only grow and not shrink after transient peaks? Yes. It prevents freeing/draining of the slab cache. -Bosko