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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message