Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 1999 09:18:04 -0700
From:      "Ronald G. Minnich" <rminnich@lanl.gov>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: kstat - an API for gathering kernel stats
Message-ID:  <Pine.SGI.4.10.9911040911140.1726231-100000@acl.lanl.gov>
In-Reply-To: <Pine.BSF.4.20.9911041106250.18969-100000@sasami.jurai.net>

next in thread | previous in thread | raw e-mail | index | archive | help

FWIW -- I think a reasonable goal of "getting stats out of the kernel" is
that pulling data out ought to run as fast as bcopy, and it would be nice
if you didn't have to drop into a syscall. Kind of an extreme position, I
guess, but if you have ever seen the rstatd on linux eat 12% of cpu to
return 10 samples/second you'd know why I want it. Given the slowness of
some stuff (it takes linux 6 milliseconds to count up free/shared memory
pages -- the code visits every page struct) bcopy speed is not a bad
yardstick. Sysctl is much faster than reading files in /proc, but still
too slow. How will kstat compare? how does it compare in solaris? Anybody
got a bandwidth number?

Numbers I have now (sorry, just for linux at present):
	Using files in /proc: awful, so slow it's not worth
		measuring exactly, something like 400 bytes in 20 
		milliseonds
	Using sysctl: Varies depending on the strategy and how much 
			data you yank per variable, but O(1-10
			Mbytes/second)	

ron



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SGI.4.10.9911040911140.1726231-100000>