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 0EC189FA6B3 for ; Sat, 17 Jun 2006 14:43:18 -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 17846-07 for ; Sat, 17 Jun 2006 14:43:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 083B69FA5E7 for ; Sat, 17 Jun 2006 14:43:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5HHh68S022041; Sat, 17 Jun 2006 13:43:06 -0400 (EDT) To: Bruce Momjian cc: Qingqing Zhou , pgsql-hackers@postgresql.org Subject: Re: Test request for Stats collector performance improvement In-reply-to: <200606161603.k5GG3MS27858@candle.pha.pa.us> References: <200606161603.k5GG3MS27858@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 16 Jun 2006 12:03:22 -0400" Date: Sat, 17 Jun 2006 13:43:06 -0400 Message-ID: <22040.1150566186@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/853 X-Sequence-Number: 85086 Bruce Momjian writes: > 1) Run this script and record the time reported: > ftp://candle.pha.pa.us/pub/postgresql/mypatches/stat.script One thing you neglected to specify is that the test must be done on a NON ASSERT CHECKING build of CVS HEAD (or recent head, at least). On these trivial "SELECT 1" commands, an assert-checking backend is going to spend over 50% of its time doing end-of-transaction assert checks. I was reminded of this upon trying to do oprofile: CPU: P4 / Xeon with 2 hyper-threads, speed 2793.03 MHz (estimated) Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 240000 samples % symbol name 129870 37.0714 AtEOXact_CatCache 67112 19.1571 AllocSetCheck 16611 4.7416 AtEOXact_Buffers 10054 2.8699 base_yyparse 7499 2.1406 hash_seq_search 7037 2.0087 AllocSetAlloc 4267 1.2180 hash_search 4060 1.1589 AtEOXact_RelationCache 2537 0.7242 base_yylex 1984 0.5663 grouping_planner 1873 0.5346 LWLockAcquire 1837 0.5244 AllocSetFree 1808 0.5161 exec_simple_query 1763 0.5032 ExecutorStart 1527 0.4359 PostgresMain 1464 0.4179 MemoryContextAllocZeroAligned Let's be sure we're all measuring the same thing. regards, tom lane