From owner-freebsd-hackers Thu Nov 4 18:39:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id CD9DE15742 for ; Thu, 4 Nov 1999 18:39:29 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id SAA00664; Thu, 4 Nov 1999 18:30:01 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199911050230.SAA00664@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Arun Sharma Cc: "Matthew N. Dodd" , freebsd-hackers@FreeBSD.ORG Subject: Re: kstat - an API for gathering kernel stats In-reply-to: Your message of "Thu, 04 Nov 1999 14:05:51 PST." <19991104140551.A1331@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Nov 1999 18:30:01 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > --vtzGhvizbBRQ85DL > Content-Type: text/plain; charset=us-ascii > > On Thu, Nov 04, 1999 at 12:52:50PM -0500, Matthew N. Dodd wrote: > > On Thu, 4 Nov 1999, Arun Sharma wrote: > > > I just looked at the sysctl implementation and there are some differences. > > > Moreover, since it was not being used in tools like vmstat and xosview, > > > I thought there must be a reason. > > > > > > sysctl also seems to assume that it doesn't get called frequently. So > > > mapping the name to the sysctl data is a slightly more heavy duty > > > operation than a hash table lookup. > > > > Wouldn't hashing the sysctl OIDs be the way to go then? > > > > Why invent another namespace? > > > > Please see the attached mail. Yes - I didn't look closely at sysctl, before > I started working on kstat. My argument is that we need different interfaces > for kernel tuning (which is what sysctl seems to be good at) and kernel > performance statistics collection. > > The former activity is more heavy weight than the latter. Sysctl is faster than kstat once you have performed the name->oid lookup. There is basically nothing that kstat can do that sysctl can't do better and faster, apart from lookup-by-name. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message