From owner-freebsd-current@FreeBSD.ORG Thu Jul 20 17:29:21 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG 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 8CE7516A4E0 for ; Thu, 20 Jul 2006 17:29:21 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64F3643D5F for ; Thu, 20 Jul 2006 17:29:18 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (ufwdix@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k6KHT6T8001390; Thu, 20 Jul 2006 19:29:11 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k6KHT55o001389; Thu, 20 Jul 2006 19:29:05 +0200 (CEST) (envelope-from olli) Date: Thu, 20 Jul 2006 19:29:05 +0200 (CEST) Message-Id: <200607201729.k6KHT55o001389@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, imp@bsdimp.com In-Reply-To: <20060720.093457.1661914908.imp@bsdimp.com> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 20 Jul 2006 19:29:11 +0200 (CEST) Cc: Subject: Re: vmstat's entries type X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, imp@bsdimp.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 17:29:21 -0000 M. Warner Losh wrote: > One approach that we could use for 64-bit counters would be to just > use 32-bits one, and poll them for overflow and bump an overflow > count. That's an interesting idea. That would eliminate the efficieny concern. > This assumes that the 32-bit counters overflow much less often > than the polling interval, Let me try some math ... The context-switch counter on a 3+GHz machine here increases by 500 per second when idle, and by 26,000 per second when under some serious load (so it overflows after less than two days!). Lets say we need to cope with 1,000,000 per second on average, which would be really a lot. In that case a 32bit counter would overflow after 1 hour 11 minutes, which I think is plenty of time to poll for an overflow. If we poll every five minutes, it would be sufficient for an average of 14 million counter events per second. > and easily triples the amount of storage for each of them... True, storage is tripled. But how many counters are we talking about here? I guess rather a few, not thousands of them, right? > It is ugly :-( Yes, I certainly agree, it's ugly. But having wrong output from "vmstat -s" and other tools is ugly, too -- and it is noticed by a lot more people. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Perl will consistently give you what you want, unless what you want is consistency." -- Larry Wall