From owner-freebsd-hackers@FreeBSD.ORG Wed May 26 18:52:04 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6CF81065676 for ; Wed, 26 May 2010 18:52:04 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 8F28D8FC12 for ; Wed, 26 May 2010 18:52:04 +0000 (UTC) Received: by qyk11 with SMTP id 11so9995861qyk.13 for ; Wed, 26 May 2010 11:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vrkDJyQqlitcaLO18QL6Pd8yc+2RSmf6kRKKiwYGNVE=; b=n2NFIRpUDhN1qgHIf0dBe052w0rz7/DaF/3XQidtAcPuDDthYvUaj/Aj1y00622Xhw Tye36NR/vd5VJTv6vDmsZSyGx4QTlbyvqKUz7E/pZrQZi9GT9QlsJWSsKMqhh2kbTp+t 97Hcn+MQWM6XbZaVP/ZbOWpah1SyD7ISM/y+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Af0KoZoYh7jnUnGDmXNI+spNFI4SxRgahAuagamLoQTdLKdv7MQaqZTMAupqmd6hjG 9S7MoGiTHo4H87kkTmp62le0ZENwYb2bV6IoNdj6WxPXOHJaWJhNxoTCGBbhtezY03CI JaAivn+JKhRksySCTVOUltOnTn3dfWX5LnsMo= MIME-Version: 1.0 Received: by 10.224.19.9 with SMTP id y9mr5058818qaa.353.1274899914376; Wed, 26 May 2010 11:51:54 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Wed, 26 May 2010 11:51:52 -0700 (PDT) In-Reply-To: <4BFC1660.1000405@dataix.net> References: <1274739973.31299.23.camel@localhost.localdomain> <4BFBD838.40208@dataix.net> <4BFC1660.1000405@dataix.net> Date: Wed, 26 May 2010 11:51:52 -0700 Message-ID: From: Garrett Cooper To: jhell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers , sbruno@freebsd.org, Sean Bruno Subject: Re: Exposing Zone Sleeps X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2010 18:52:05 -0000 On Tue, May 25, 2010 at 11:26 AM, jhell wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 05/25/2010 10:01, jhell wrote: >> On 05/24/2010 18:26, Sean Bruno wrote: >>> Find attached a patch against -CURRENT. >> >>> This update exposes a counter that indicates the number of times that w= e >>> sleep when attempting to allocate a slab from the keg. =A0In other word= s, >>> the number of times we BLOCK and wait, which is bad. >> >>> This allows differentiation between times when we failed to allocate an= d >>> it was ok and times where we were forced to sleep. =A0The current FAIL >>> counter does not make this distinction. >> >>> Exposes this information via uma_zone_t->uz_sleeps. >> >>> Add a new sysctl to retrieve this information. >>> Enhance vmstat -z to retrieve this information. >> >>> We've found this *extremely* useful here at Yahoo in the past and would >>> like to commit this if it is acceptable. >> >>> Tested on 32bit and 64bit architectures on 6/7/CURRENT. >> >> >> Hi Sean, >> >> Nice work on this. I applied this to stable/8 r208530 and I am in the >> process of compiling the kernel right now. Everything else has built & >> runs as expected "i386". Attached is the adjusted patch which was one >> modification to the line number for uz_sleeps in sys/vm/uma_int.h. >> >> 8 files changed, 106 insertions(+), 7 deletions(-) >> >> For those wishing to apply this patch and test for them self: >> >> cd /usr/src >> patch > cd /usr/src/include >> make obj && make depend && make includes && make install >> cd /usr/src/lib/libmemstat >> make obj && make depend && make includes && make install >> cd /usr/src/usr.bin/vmstat >> make obj && make depend && make install >> cd /usr/src >> make kernel KERNCONF=3DYOUR_KERN_CONF >> reboot >> >> Can't wait to see some results from this & I will report back with >> either negative results of the build & run or positive results from the >> stats collected. >> >> If there is anything needed feel free to let me know and I will do what >> is possible ASAP. >> >> Thanks again, >> > > This patch instead pardon the early.post but there was a problem with > the last patch that I attached for stable/8 r208530 with arguments 10 & > 11 to function sysctl_vm_zone where it wanted a long unsigned integer > rather than u_int64_t. > > This patch satisfies that. Whether its correct is left to the reader but > compiles cleanly & runs smoothly. I know this seems trivial, but could you change: + printf("%-20s %6s %6s %8s %8s %8s %4s %4s\n\n", "ITEM", "SIZE", + "LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP"); to + printf("%-20s %6s %6s %8s %8s %8s %4s %4s\n\n", "ITEM", "SIZE", + "LIMIT", "USED", "FREE", "REQS", "FAIL", "SLEEP"); that way the plural nature of requests is more straightforward and understo= od. Also, do all of the fields _really_ need to have a field width? Seems like overkill to me... Thanks, -Garrett