From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 13 10:00:00 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D3CE819E; Sat, 13 Apr 2013 10:00:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4736BA99; Sat, 13 Apr 2013 09:59:59 +0000 (UTC) Received: by mail-ee0-f44.google.com with SMTP id c41so1617765eek.3 for ; Sat, 13 Apr 2013 02:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=RhCqstBPNV+kOI0U6HDfLAY5u503SAlnFetgdPL7HnM=; b=pI2/N+Cvttfi7SxaSdWsTP3f6hKQGQ557SWJAEb0avZ0Dk16+kB2mLpUtxkKTI5Zgr A6F6XYP0z8vOmWdTBvBpMzBBI52+3jH8XWgC3in+8g1zDWAAab/OmC2e7CDBi5K3rs9R 5Wfw+8V4m2dVMFXp6za2V/kB0n8aHav/R44Dx2rStAXyJH0Lat5GgR9wxmoPlIn6zvXB 6u6IxyrwWqQQHGu6O3o5BFRWrVsIsQBmb2b7elV3/XgWv7W0wJzA8tD1dpg9VaAn5UIm joIuLipJc3W4bE2/U1kol0JfjrboHxz0qc5dlTurCOeyrn0QKlR5EHXtOimHwhQkgLuO chrQ== X-Received: by 10.15.102.3 with SMTP id bq3mr37751103eeb.42.1365847193119; Sat, 13 Apr 2013 02:59:53 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id cd3sm15594347eeb.6.2013.04.13.02.59.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 02:59:52 -0700 (PDT) Sender: Alexander Motin Message-ID: <51692C95.3010901@FreeBSD.org> Date: Sat, 13 Apr 2013 12:59:49 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130326 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-geom@FreeBSD.org, freebsd-hackers@FreeBSD.org Subject: devstat overhead VS precision Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 10:00:00 -0000 Hi. It is long known that collecting disk and GEOM statistics may cause significant processing overhead under high IOPS. On my recent high-IOPS benchmarks performance difference was reaching three times! Last time situation improved a lot by more active use of TSC, but there are still many systems where TSCs are not synchronized. I propose to switch that statistics from using binuptime() to getbinuptime() to solve the problem globally. From one side getbinuptime() resolution is limited by 1ms, but since time is usually averaged over the many I/Os, additional sub-millisecond precision will come from sampling. Since most of tools now show request processing times up to 0.1ms, that precision should be sufficient. I believe real disk performance is more important that n-th digit in some statistics. The following patch does the change and makes disk performance irrelevant to the timecounter performance: http://people.freebsd.org/~mav/devstat_time.patch Are there any objections against it? -- Alexander Motin