X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D56269FA60C for ; Fri, 16 Jun 2006 15:14:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 67736-05 for ; Fri, 16 Jun 2006 15:14:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cronos.madness.at (madness.at [217.196.146.217]) by postgresql.org (Postfix) with ESMTP id 6086D9FA10A for ; Fri, 16 Jun 2006 15:14:54 -0300 (ADT) Received: from mastermind.kaltenbrunner.cc ([83.215.233.60]) by cronos.madness.at with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.62 (FreeBSD)) (envelope-from ) id 1FrIqF-0009R4-FB; Fri, 16 Jun 2006 20:14:52 +0200 Message-ID: <4492F517.7060405@kaltenbrunner.cc> Date: Fri, 16 Jun 2006 20:14:47 +0200 From: Stefan Kaltenbrunner User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: Bruce Momjian CC: Qingqing Zhou , pgsql-hackers@postgresql.org Subject: Re: Test request for Stats collector performance improvement References: <200606161624.k5GGO3N03466@candle.pha.pa.us> In-Reply-To: <200606161624.k5GGO3N03466@candle.pha.pa.us> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/808 X-Sequence-Number: 85041 Bruce Momjian wrote: > Stefan Kaltenbrunner wrote: >> Bruce Momjian wrote: >>> OK, based on reports I have seen, generally stats_query_string adds 50% >>> to the total runtime of a "SELECT 1" query, and the patch reduces the >>> overhead to 25%. >> that is actually not true for both of the platforms(a slow OpenBSD >> 3.9/x86 and a very fast Linux/x86_64) I tested on. Both of them show >> virtually no improvement with the patch and even worst it causes >> considerable (negative) variance on at least the Linux box. > > I see the results I suggested on OpenBSD that you reported. > >> OpenBSD 3.9-current/x86: >> >> without stats: >> 0m6.79s real 0m1.56s user 0m1.12s system >> >> -HEAD + stats: >> 0m10.44s real 0m2.26s user 0m1.22s system >> >> -HEAD + stats + patch: >> 0m10.68s real 0m2.16s user 0m1.36s system yep those are very stable even over a large number of runs > > and I got similar results reported from a Debian: > > Linux 2.6.16 on a single processor HT 2.8Ghz Pentium compiled > with gcc 4.0.4. > > > > real 0m3.306s > > > real 0m4.905s > > > real 0m4.448s > > I am unclear on the cuase for the widely varying results you saw in > Debian. > I can reproduce the widely varying results on a number of x86 and x86_64 based Linux boxes here (Debian,Fedora and CentOS) though I cannot reproduce it on a Fedora core 5/ppc box. All the x86 boxes are SMP - while the ppc one is not - that might have some influence on the results. Stefan