Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Sep 2006 10:01:08 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        m.ehinger@ltur.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: dev vs. sysctl
Message-ID:  <20060903.100108.-108810397.imp@bsdimp.com>
In-Reply-To: <OFF6ACECFA.EDBF24DA-ONC12571D8.0021A7A1-C12571D8.00222060@gateway-inter.net>
References:  <OFF6ACECFA.EDBF24DA-ONC12571D8.0021A7A1-C12571D8.00222060@gateway-inter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <OFF6ACECFA.EDBF24DA-ONC12571D8.0021A7A1-C12571D8.00222060@gateway-inter.net>
            m.ehinger@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060903.100108.-108810397.imp>