From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 3 16:01:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC8EB16A4DA for ; Sun, 3 Sep 2006 16:01:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6B4343D55 for ; Sun, 3 Sep 2006 16:01:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k83G0o50075574; Sun, 3 Sep 2006 10:00:51 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 03 Sep 2006 10:01:08 -0600 (MDT) Message-Id: <20060903.100108.-108810397.imp@bsdimp.com> To: m.ehinger@ltur.de From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 03 Sep 2006 10:00:51 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: dev vs. sysctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2006 16:01:32 -0000 In message: 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