dev vs. sysctl

M. Warner Losh imp at bsdimp.com
Sun Sep 3 09:01:32 PDT 2006


In message: <OFF6ACECFA.EDBF24DA-ONC12571D8.0021A7A1-C12571D8.00222060 at gateway-inter.net>
            m.ehinger at ltur.de writes:
: i just want to know which one is faster? Which has the lowest overhead?
: 
: I want to return 8 bytes (tow integer values) of data about 50 times a second.

In the past I did some silly measurements and found that sysctls were
slower by a small amount.  I never could figure out why, since the
path to the sysctl seemed like it would be shorter than the path to
the read.  This was in the 3.x timeframe, so your best bet is to code
up both and see which one is better today.

Warner


More information about the freebsd-hackers mailing list