From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 4 08:42:49 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 817FC16A59C for ; Mon, 4 Sep 2006 08:42:49 +0000 (UTC) (envelope-from m.ehinger@ltur.de) Received: from postx.gateway-inter.net (postx.gateway-inter.net [213.144.19.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63CC443D6A for ; Mon, 4 Sep 2006 08:42:36 +0000 (GMT) (envelope-from m.ehinger@ltur.de) In-Reply-To: <20060903.100108.-108810397.imp@bsdimp.com> Sensitivity: To: "M. Warner Losh" From: m.ehinger@ltur.de MIME-Version: 1.0 Message-ID: Date: Mon, 4 Sep 2006 10:43:12 +0200 Content-type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Mon, 04 Sep 2006 12:35:32 +0000 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: Mon, 04 Sep 2006 08:42:49 -0000 "M. Warner Losh" schrieb am 03.09.2006 18:01:08: > 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. OK i did that and it seems to be still the same. "read" seems to be faster then th sysctl call. I got about 8.7 seconds for 100,000 sysctl reads and 1.8 seconds for 100,000 read calls. Measured on a Thinkpad with 75MHz CPU frequency. Thanks Maik