From owner-freebsd-performance@FreeBSD.ORG Thu Jan 3 02:46:48 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6914316A418; Thu, 3 Jan 2008 02:46:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id DB4F113C459; Thu, 3 Jan 2008 02:46:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m032khu6028452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jan 2008 13:46:45 +1100 Date: Thu, 3 Jan 2008 13:46:43 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Gary Stanley In-Reply-To: <20080102123902.8CB6213C448@mx1.freebsd.org> Message-ID: <20080103134118.G16729@delplex.bde.org> References: <20071201205609.GA54238@harmless.hu> <20071204130810.GA77186@harmless.hu> <47779AA7.2060801@FreeBSD.org> <20071230132451.GA61295@harmless.hu> <47779EBC.5020900@FreeBSD.org> <20071230134354.GA63555@harmless.hu> <4777A65C.8020406@FreeBSD.org> <20071230141118.GA67574@harmless.hu> <4777AB9C.1010003@FreeBSD.org> <8cb6106e0801012008q18830aebp906ebfeb3c519e5a@mail.gmail.com> <477B6EB3.50202@FreeBSD.org> <20080102123902.8CB6213C448@mx1.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: josh.carroll@gmail.com, Kris Kennaway , freebsd-performance@freebsd.org, Ivan Voras Subject: Re: mysql scaling questions X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 02:46:48 -0000 On Wed, 2 Jan 2008, Gary Stanley wrote: > At 06:00 AM 1/2/2008, Kris Kennaway wrote: > >> Per later discussion you will also need to either comment out the syscalls >> that are (might be) being cached by glibc to artificially inflate its >> reported rate, or verify that it is not doing so. > > IIRC linux uses vsyscalls on x86_64, and calling things like gettimeofday() > isn't as expensive as it normally should be.. vsyscalls are similar to > darwins' commpage. How does it implement gettimeofday()'s 1us precision using direct access? I see one way: put the time and other volatiles on an unmapped page, and update the time in the trap handler. With a lot of work, this should be only slightly slower than the gettimeofday() syscall. Bruce