Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkQ5o-0004C6-V4 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 May 2014 03:42:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkQ5o-0004yn-Ej for pgsql-hackers@arkaria.postgresql.org; Wed, 14 May 2014 03:42:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkQ5n-0004yZ-BF for pgsql-hackers@postgresql.org; Wed, 14 May 2014 03:42:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkQ5l-0005d3-5x for pgsql-hackers@postgresql.org; Wed, 14 May 2014 03:42:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s4E3gpeV004921; Tue, 13 May 2014 23:42:51 -0400 From: Tom Lane To: Greg Stark cc: PostgreSQL-development Subject: Re: gettimeofday is at the end of its usefulness? In-reply-to: References: <31856.1400021891@sss.pgh.pa.us> Comments: In-reply-to Greg Stark message dated "Wed, 14 May 2014 04:34:10 +0100" Date: Tue, 13 May 2014 23:42:51 -0400 Message-ID: <4920.1400038971@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Greg Stark writes: > I actually think it would be more interesting if we could measure the > overhead and adjust for it. Actually, that's quite a good thought. The overhead should be a pretty stable number on any given machine, so in theory we could do this to high precision. And the numbers I just showed say that on current x86_64 platforms, the *best we could possibly hope for* in terms of direct overhead reduction is about 4x. Which is something, but it hardly makes the problem vanish. I have a vague feeling that we discussed subtract-the-overhead once before and thought it wasn't necessary yet. Maybe it's time. But we also need to be using something that gives better than 1usec resolution. So I'm still thinking we should use clock_gettime() where available, and look for alternative APIs where not. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers