Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 096929FA38F; Fri, 15 Dec 2006 08:32:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 35367-05; Fri, 15 Dec 2006 08:32:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by postgresql.org (Postfix) with ESMTP id C8EC69FA394; Fri, 15 Dec 2006 08:32:48 -0400 (AST) Received: from [10.119.110.2] (helo=mx00.int.bfk.de) by mx01.bfk.de with esmtp id 1GvCEf-0005Xb-D9; Fri, 15 Dec 2006 13:32:21 +0100 Received: from fweimer by bfk.de with local id 1GvCEe-0000nT-Mf; Fri, 15 Dec 2006 13:32:20 +0100 To: "Simon Riggs" Cc: "Martijn van Oosterhout" , "Tom Lane" , "Kelly Burkhart" , "Evgeny Gridasov" , , Subject: Re: [HACKERS] EXPLAIN ANALYZE on 8.2 References: <20061214163230.d46f0138.eugrid@fpm.kubsu.ru> <21146.1166112702@sss.pgh.pa.us> <20061214192920.c75385d6.eugrid@fpm.kubsu.ru> <21516.1166114475@sss.pgh.pa.us> <29450.1166141131@sss.pgh.pa.us> <1166178488.3882.56.camel@silverbirch.site> <20061215105008.GD958@svana.org> <1166185247.3882.69.camel@silverbirch.site> From: Florian Weimer Date: Fri, 15 Dec 2006 13:32:20 +0100 In-Reply-To: <1166185247.3882.69.camel@silverbirch.site> (Simon Riggs's message of "Fri, 15 Dec 2006 12:20:46 +0000") Message-ID: <82irgdnxuz.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/406 X-Sequence-Number: 22462 * Simon Riggs: >> I think the best option is setitimer(), but it's not POSIX so >> platform support is going to be patchy. > > Don't understand that. I thought that was to do with alarms and > signals. You could use it for sampling. Every few milliseconds, you record which code is executing (possibly using a global variable which is set and reset accordingly). But this might lead to tons of interrupted system calls, and not all systems mask them, so this might not be an option for the PostgreSQL code base. On the other hand, if performance in more recent Linux releases (from kernel.org) are acceptable, you should assume that the problem will eventually fix itself. FWIW, I see the 9x overhead on something that is close to 2.6.17 (on AMD64/Opteron), so this could be wishful thinking. 8-( --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99