diff --git "a/pgsql-performance.200609" "b/pgsql-performance.200609" new file mode 100644--- /dev/null +++ "b/pgsql-performance.200609" @@ -0,0 +1,40700 @@ +From pgsql-performance-owner@postgresql.org Mon Sep 4 15:06:01 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 0972E9FB2D6 + for ; + Mon, 4 Sep 2006 15:06:01 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 85817-08 for + ; + Mon, 4 Sep 2006 18:05:58 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from zoraida.natserv.net (p65-147.acedsl.com [66.114.65.147]) + by postgresql.org (Postfix) with ESMTP id 6BBEF9FB254 + for ; + Mon, 4 Sep 2006 15:05:48 -0300 (ADT) +Received: by zoraida.natserv.net (Postfix, from userid 125) + id 4D0F0CB4D; Mon, 4 Sep 2006 14:20:03 -0400 (EDT) +Received: by zoraida.natserv.net (Postfix, from userid 125) + id DE348C560; Mon, 4 Sep 2006 14:27:29 -0400 (EDT) +Received: from zoraida.natserv.net (zoraida.natserv.net [66.114.65.147]) + by zoraida.natserv.net (Postfix) with ESMTP id 770BBB871; + Fri, 1 Sep 2006 08:20:57 -0400 (EDT) +References: <9e4684ce0606140052m62552d41xa9364b9d4e266c97@mail.gmail.com> + <448FC843.1090205@aeccom.com> + <9e4684ce0606140421m1a71581dmaa7a9adb988aedc8@mail.gmail.com> +Message-ID: +X-Mailer: http://www.courier-mta.org/cone/ +From: Francisco Reyes +To: hubert depesz lubaczewski +Cc: Sven Geisler , + Pgsql-Performance +Subject: Re: how to partition disks +Date: Fri, 01 Sep 2006 08:20:57 -0400 +Mime-Version: 1.0 +Content-Type: text/plain; format=flowed; charset="US-ASCII" +Content-Disposition: inline +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.513 tagged_above=0 required=5 + tests=DATE_IN_PAST_48_96, FORGED_RCVD_HELO, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/22 +X-Sequence-Number: 20708 + +hubert depesz lubaczewski writes: + +> On 6/14/06, Sven Geisler +> raid 10 is of course not questionable. but are you sure that it will work +> faster than for example: +> 2 discs (raid 1) for xlog +> 6 discs (raid 10) for tables +> 6 discs (raid 10) for indices? + + +Caching up on the performance list. +Although this may not help the original poster.. wanted to share a recent +experience related to allocation of disks on a raid. + +We just got a server with 16 disks. +We condfigured 12 to 1 raid controller and a second raid with 4. Both using +raid 10. + +RAID 1 +10 x 7,200rpm disks +2 hot spares + +RAID 2 +4 x 10,000 rpm disk + +One of the things I always do with new machines is to run bonnie++ and get +some numbers. + +I expected the second raid to have better numbers than the first because the +disks were 10K drives (all SATA). To my surprise the larger raid had better +numbers. + +So I figure the number of spindles on a single RAID does make a big +difference. To that regard splitting 16 disks into 3 sets may help with data +needing to be read/written to be in separate raids, but may degrade +performance by reducing the number of spindles on each of the raids. + +From pgsql-performance-owner@postgresql.org Fri Sep 1 10:25:10 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 84E0F9FB4A4 + for ; + Fri, 1 Sep 2006 10:25:03 -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 85672-02-5 + for ; + Fri, 1 Sep 2006 10:17:44 -0300 (ADT) +X-Greylist: delayed 00:20:36.027061 by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id 2CE079FB4BA + for ; + Fri, 1 Sep 2006 09:59:57 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from folium.sgala.coma (fw-nat.workzone.ovus.it [83.211.167.226]) + by svr4.postgresql.org (Postfix) with ESMTP id 064465AF883 + for ; + Fri, 1 Sep 2006 12:39:19 +0000 (GMT) +Received: by folium.sgala.coma (Postfix, from userid 1000) + id AD3752FA887; Fri, 1 Sep 2006 14:39:15 +0200 (CEST) +Date: Fri, 1 Sep 2006 14:39:15 +0200 +From: Matteo Sgalaberni +To: pgsql-performance@postgresql.org +Subject: database bloat,non removovable rows, slow query etc... +Message-ID: <20060901123915.GT2266@sgala.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +X-Operating-System: Linux folium 2.4.20-3-686 +User-Agent: Mutt/1.5.11+cvs20060126 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/1 +X-Sequence-Number: 20687 + +Hi, probably this is a very frequenfly question... I read archivies of +this list but I didn't found a finally solution for this aspect. I'll +explain my situation. + +PSQL version 8.1.3 +configuration of fsm,etcc default +autovacuum and statistics activated + +22 daemons that have a persistent connection to this database(all +connection are in "idle"(no transaction opened). + +this is the vacuum output of a table that it's updated frequently: +database=# VACUUM ANALYZE verbose cliente; +INFO: vacuuming "public.cliente" +INFO: index "cliente_pkey" now contains 29931 row versions in 88 pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: index "cliente_login_key" now contains 29931 row versions in 165 pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.01s/0.00u sec elapsed 0.00 sec. +INFO: "cliente": found 0 removable, 29931 nonremovable row versions in 559 pages +DETAIL: 29398 dead row versions cannot be removed yet. +There were 9 unused item pointers. +0 pages are entirely empty. +CPU 0.01s/0.01u sec elapsed 0.01 sec. +INFO: vacuuming "pg_toast.pg_toast_370357" +INFO: index "pg_toast_370357_index" now contains 0 row versions in 1 pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: "pg_toast_370357": found 0 removable, 0 nonremovable row versions in 0 pages +DETAIL: 0 dead row versions cannot be removed yet. +There were 0 unused item pointers. +0 pages are entirely empty. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: analyzing "public.cliente" +INFO: "cliente": scanned 559 of 559 pages, containing 533 live rows and 29398 dead rows; 533 rows in sample, 533 estimated total rows +VACUUM + +database=# SELECT * from pgstattuple('cliente'); + table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent +-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+-------------- + 4579328 | 533 | 84522 | 1.85 | 29398 | 4279592 | 93.45 | 41852 | 0.91 +(1 row) + +The performance of this table it's degraded now and autovacuum/vacuum full +don't remove these dead tuples. Only if I do a CLUSTER of the table the tuples +are removed. + +The same problem is on other very trafficated tables. + +I think that the problems probably are: +- tune the value of my fsm/etc settings in postgresql.conf but i don't +understdand how to tune it correctly. +- the persistent connections to this db conflict with the +autovacuum but i don't understand why. there are no transaction opened, +only connections in "idle" state. + +Tell me what do you think... + +Regards, + +Matteo + + + +From pgsql-performance-owner@postgresql.org Fri Sep 1 12:39:46 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 52F329FB488 + for ; + Fri, 1 Sep 2006 12:39:46 -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 99620-01-8 + for ; + Fri, 1 Sep 2006 12:38:40 -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 BE9379FB559 + for ; + Fri, 1 Sep 2006 11:43:32 -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 k81EhUu9004028; + Fri, 1 Sep 2006 10:43:31 -0400 (EDT) +To: Matteo Sgalaberni +cc: pgsql-performance@postgresql.org +Subject: Re: database bloat,non removovable rows, slow query etc... +In-reply-to: <20060901123915.GT2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> +Comments: In-reply-to Matteo Sgalaberni + message dated "Fri, 01 Sep 2006 14:39:15 +0200" +Date: Fri, 01 Sep 2006 10:43:30 -0400 +Message-ID: <4027.1157121810@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.128 tagged_above=0 required=5 tests=AWL, + SPF_HELO_PASS, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/2 +X-Sequence-Number: 20688 + +Matteo Sgalaberni writes: +> 22 daemons that have a persistent connection to this database(all +> connection are in "idle"(no transaction opened). + +You may think that, but you are wrong. + +> INFO: "cliente": found 0 removable, 29931 nonremovable row versions in 559 pages +> DETAIL: 29398 dead row versions cannot be removed yet. + +The only way the above can happen is if there are some fairly old open +transactions. Looking in pg_stat_activity might help you identify the +culprit(s). + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Fri Sep 1 15:08:05 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 775DB9FB961; + Fri, 1 Sep 2006 15:08:02 -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 13234-06-5; Fri, 1 Sep 2006 15:07:29 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from fdlnint02.fds.com (fdlnint02.fds.com [208.15.91.51]) + by postgresql.org (Postfix) with ESMTP id 71E209FB4D5; + Fri, 1 Sep 2006 12:34:04 -0300 (ADT) +In-Reply-To: <20060901123915.GT2266@sgala.com> +Subject: Re: database bloat,non removovable rows, slow query etc... +To: Matteo Sgalaberni +Cc: pgsql-performance@postgresql.org, + pgsql-performance-owner@postgresql.org +X-Mailer: Lotus Notes Release 6.5.4 March 27, 2005 +Message-ID: + +From: Patrick Hatcher +Date: Fri, 1 Sep 2006 08:33:34 -0700 +X-MIMETrack: Serialize by Router on FDLNINT02/FSG/SVR/FDS(Release + 6.5.4FP1|June 19, 2005) at 09/01/2006 11:34:08 AM +MIME-Version: 1.0 +Content-type: text/plain; charset=US-ASCII +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.634 tagged_above=0 required=5 tests=AWL, SPF_NEUTRAL +X-Spam-Level: +X-Archive-Number: 200609/3 +X-Sequence-Number: 20689 + +Are there open transactions on the table in question? We had the same +issue. A 100K row table was so bloated that the system thought there was +1M rows. We had many transaction that we noticed in TOP, but since +we could not track down which process or user was holding the table we had +to restart Pg. Once restarted we were able to do a VACUUM FULL and this +took care of the issue. +hth +Patrick Hatcher +Development Manager Analytics/MIO +Macys.com + + + + + Matteo Sgalaberni + + Sent by: To + pgsql-performance pgsql-performance@postgresql.org + -owner@postgresql cc + .org + Subject + [PERFORM] database bloat,non + 09/01/06 05:39 AM removovable rows, slow query etc... + + + + + + + + + + +Hi, probably this is a very frequenfly question... I read archivies of +this list but I didn't found a finally solution for this aspect. I'll +explain my situation. + +PSQL version 8.1.3 +configuration of fsm,etcc default +autovacuum and statistics activated + +22 daemons that have a persistent connection to this database(all +connection are in "idle"(no transaction opened). + +this is the vacuum output of a table that it's updated frequently: +database=# VACUUM ANALYZE verbose cliente; +INFO: vacuuming "public.cliente" +INFO: index "cliente_pkey" now contains 29931 row versions in 88 pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: index "cliente_login_key" now contains 29931 row versions in 165 +pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.01s/0.00u sec elapsed 0.00 sec. +INFO: "cliente": found 0 removable, 29931 nonremovable row versions in 559 +pages +DETAIL: 29398 dead row versions cannot be removed yet. +There were 9 unused item pointers. +0 pages are entirely empty. +CPU 0.01s/0.01u sec elapsed 0.01 sec. +INFO: vacuuming "pg_toast.pg_toast_370357" +INFO: index "pg_toast_370357_index" now contains 0 row versions in 1 pages +DETAIL: 0 index pages have been deleted, 0 are currently reusable. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: "pg_toast_370357": found 0 removable, 0 nonremovable row versions in +0 pages +DETAIL: 0 dead row versions cannot be removed yet. +There were 0 unused item pointers. +0 pages are entirely empty. +CPU 0.00s/0.00u sec elapsed 0.00 sec. +INFO: analyzing "public.cliente" +INFO: "cliente": scanned 559 of 559 pages, containing 533 live rows and +29398 dead rows; 533 rows in sample, 533 estimated total rows +VACUUM + +database=# SELECT * from pgstattuple('cliente'); + table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | +dead_tuple_len | dead_tuple_percent | free_space | free_percent +-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+-------------- + + 4579328 | 533 | 84522 | 1.85 | 29398 | +4279592 | 93.45 | 41852 | 0.91 +(1 row) + +The performance of this table it's degraded now and autovacuum/vacuum full +don't remove these dead tuples. Only if I do a CLUSTER of the table the +tuples +are removed. + +The same problem is on other very trafficated tables. + +I think that the problems probably are: +- tune the value of my fsm/etc settings in postgresql.conf but i don't +understdand how to tune it correctly. +- the persistent connections to this db conflict with the +autovacuum but i don't understand why. there are no transaction opened, +only connections in "idle" state. + +Tell me what do you think... + +Regards, + +Matteo + + + +---------------------------(end of broadcast)--------------------------- +TIP 4: Have you searched our list archives? + + http://archives.postgresql.org + + + +From pgsql-performance-owner@postgresql.org Fri Sep 1 15:41:44 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id E8B0F9FB512 + for ; + Fri, 1 Sep 2006 15:41:43 -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 16374-06 for + ; + Fri, 1 Sep 2006 15:40:26 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) + by postgresql.org (Postfix) with ESMTP id 33DE89FB5A8 + for ; + Fri, 1 Sep 2006 13:09:32 -0300 (ADT) +Received: from kingfisher.intern.logix-tt.com (p549D1A3C.dip0.t-ipconnect.de + [84.157.26.60]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by mail.logix-tt.com (Postfix) with ESMTP id 21D90656CB; + Fri, 1 Sep 2006 18:11:42 +0200 (CEST) +Received: from [127.0.0.1] (localhost [127.0.0.1]) + by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 41F43183FE08D; + Fri, 1 Sep 2006 18:09:32 +0200 (CEST) +Message-ID: <44F85B3B.6080106@logix-tt.com> +Date: Fri, 01 Sep 2006 18:09:31 +0200 +From: Markus Schaber +Organization: Logical Tracking and Tracing International AG, Switzerland +User-Agent: Thunderbird 1.5.0.5 (X11/20060812) +MIME-Version: 1.0 +To: pgsql-performance@postgresql.org +Cc: Matteo Sgalaberni +Subject: Re: database bloat,non removovable rows, slow query etc... +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> +In-Reply-To: <4027.1157121810@sss.pgh.pa.us> +X-Enigmail-Version: 0.94.0.0 +Content-Type: text/plain; charset=ISO-8859-15 +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.175 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/4 +X-Sequence-Number: 20690 + +Hi, Tom and Matteo, + +Tom Lane wrote: +> Matteo Sgalaberni writes: +>> 22 daemons that have a persistent connection to this database(all +>> connection are in "idle"(no transaction opened). +> +> You may think that, but you are wrong. +> +>> INFO: "cliente": found 0 removable, 29931 nonremovable row versions in 559 pages +>> DETAIL: 29398 dead row versions cannot be removed yet. +> +> The only way the above can happen is if there are some fairly old open +> transactions. Looking in pg_stat_activity might help you identify the +> culprit(s). + +Another possibility might be an outstanding two-phase-commit transaction. + +HTH, +Markus +-- +Markus Schaber | Logical Tracking&Tracing International AG +Dipl. Inf. | Software Development GIS + +Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org + +From pgsql-performance-owner@postgresql.org Fri Sep 1 16:35:21 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id CB17C9FB4DB + for ; + Fri, 1 Sep 2006 16:35:20 -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 23205-02 for + ; + Fri, 1 Sep 2006 16:34:34 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) + by postgresql.org (Postfix) with ESMTP id CFA6D9FB9FC + for ; + Fri, 1 Sep 2006 14:01:16 -0300 (ADT) +Received: from localhost (localhost [127.0.0.1]) + by mail.mnc.ch (Postfix) with ESMTP id 8567AA82E2 + for ; + Fri, 1 Sep 2006 19:06:39 +0200 (CEST) +Received: from mail.mnc.ch ([127.0.0.1]) + by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, + port 10025) with ESMTP + id 22919-07 for ; + Fri, 1 Sep 2006 19:06:39 +0200 (CEST) +Received: from meuh.mnc.lan (62-2-77-204.static.cablecom.ch [62.2.77.204]) + by mail.mnc.ch (Postfix) with ESMTP id 25890A82A5 + for ; + Fri, 1 Sep 2006 19:06:39 +0200 (CEST) +Received: by meuh.mnc.lan (Postfix, from userid 1000) + id 061E918372E; Fri, 1 Sep 2006 19:00:53 +0200 (CEST) +To: pgsql-performance@postgresql.org +Subject: increasing shared buffers: how much should be removed from OS + filesystem cache? +X-Hashcash: + 1:20:060901:pgsql-performance@postgresql.org::3DPL6O20aGQO+PAA:00000000000000000000000000000CR+D +From: Guillaume Cottenceau +Date: 01 Sep 2006 19:00:52 +0200 +Message-ID: <87veo7a5dn.fsf@meuh.mnc.lan> +Lines: 35 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: amavisd-new at mnc.ch +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/5 +X-Sequence-Number: 20691 + +Hi, + +I've been looking at the results from the pg_statio* tables, to +view the impact of increasing the shared buffers to increase +performance. + +As expected, increasing from the default by a factor of 10~20 +moves table/index disk blocks reads to cache hits, but the +overall service time of my test page is not changed (I'm testing +with a set of queries implying an increase of 170,000 of +sum(heap_blks_hit) and 2,000 of sum(idx_blks_hit) from +pg_statio_user_tables). + +I've seen that documentation says: + + data that is not in the PostgreSQL buffer cache may still + reside in the kernel's I/O cache, and may therefore still be + fetched without requiring a physical read + +I guess this is the best explanation (btw, my test machine runs +Linux 2.6 on 1G of RAM), but I'm still wondering what should be +expected from moving caching from OS filesystem to PG - probably +PG can "cleverly" flush its cache when it is full (e.g. table +data before index data maybe?), whereas the OS will do it +"blindly", but I'm wondering about the limits of this behaviour, +particularly considering that being "very clever" about cache +flush would probably need realtime query statistics which I am +not sure PG does. + +After all, memory added to shared buffers should be mecanically +removed from effective cache size (or others), so I cannot just +increase it until the OS cannot cache anymore :) + +-- +Guillaume Cottenceau + +From pgsql-performance-owner@postgresql.org Fri Sep 1 16:54:35 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 76ABB9FB728 + for ; + Fri, 1 Sep 2006 16:54:35 -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 24979-02-4 + for ; + Fri, 1 Sep 2006 16:54:12 -0300 (ADT) +X-Greylist: delayed 04:49:18.121883 by SQLgrey- +Received: from folium.sgala.coma (fw-nat.workzone.ovus.it [83.211.167.226]) + by postgresql.org (Postfix) with ESMTP id 197809FBA46 + for ; + Fri, 1 Sep 2006 14:28:30 -0300 (ADT) +Received: by folium.sgala.coma (Postfix, from userid 1000) + id 15E512FA887; Fri, 1 Sep 2006 19:28:29 +0200 (CEST) +Date: Fri, 1 Sep 2006 19:28:29 +0200 +From: Matteo Sgalaberni +To: Tom Lane +Cc: pgsql-performance@postgresql.org +Subject: Re: database bloat,non removovable rows, slow query etc... +Message-ID: <20060901172829.GX2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <4027.1157121810@sss.pgh.pa.us> +X-Operating-System: Linux folium 2.4.20-3-686 +User-Agent: Mutt/1.5.11+cvs20060126 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/6 +X-Sequence-Number: 20692 + +On Fri, Sep 01, 2006 at 10:43:30AM -0400, Tom Lane wrote: +> Matteo Sgalaberni writes: +> > 22 daemons that have a persistent connection to this database(all +> > connection are in "idle"(no transaction opened). +> +> You may think that, but you are wrong. +Ok. I stopped all clients. No connections to this database. Only psql +console. Made vacuum +full/freeze all cominations... again dead rows non removable. Nothing +changed as in production. + +this is my postgres config: + +http://pastebin.com/781480 + +I read a lot about bloat tables related to +not appropriate fsm settings... can be the mine a case of +misconfiguration of these parameters? + +Thx + +Matteo + + + +From pgsql-performance-owner@postgresql.org Fri Sep 1 17:04:40 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id C80389FB762 + for ; + Fri, 1 Sep 2006 17:04:39 -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 24943-02-7 + for ; + Fri, 1 Sep 2006 17:04:10 -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 B92539FB91E + for ; + Fri, 1 Sep 2006 14:35:21 -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 k81HZKjx012757; + Fri, 1 Sep 2006 13:35:20 -0400 (EDT) +To: Matteo Sgalaberni +cc: pgsql-performance@postgresql.org +Subject: Re: database bloat,non removovable rows, slow query etc... +In-reply-to: <20060901172829.GX2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> +Comments: In-reply-to Matteo Sgalaberni + message dated "Fri, 01 Sep 2006 19:28:29 +0200" +Date: Fri, 01 Sep 2006 13:35:20 -0400 +Message-ID: <12756.1157132120@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.126 tagged_above=0 required=5 tests=AWL, + SPF_HELO_PASS, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/7 +X-Sequence-Number: 20693 + +Matteo Sgalaberni writes: +> Ok. I stopped all clients. No connections to this database. + +When you say "this database", do you mean the whole postmaster cluster, +or just the one database? Open transactions in other databases of the +same cluster can be a problem. + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Fri Sep 1 18:35:36 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 0DF369FB527 + for ; + Fri, 1 Sep 2006 18:35:33 -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 36162-01 for + ; + Fri, 1 Sep 2006 18:35:14 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from wr-out-0506.google.com (wr-out-0506.google.com + [64.233.184.236]) + by postgresql.org (Postfix) with ESMTP id ACD669FB71F + for ; + Fri, 1 Sep 2006 16:49:45 -0300 (ADT) +Received: by wr-out-0506.google.com with SMTP id i21so465817wra + for ; + Fri, 01 Sep 2006 12:49:44 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; + b=JAxdjIkfA41GCrreG2Swmr3A+URKhKhcJB5ivOGsb1lpR2SVpMp33igaGiNR3lXIrSiapjSK8h8w9G/O620fg9EHHDlD4g9vAKAJrisQ0pfogMTH7GpyEdqQJWUMONINYGmcJ1I7Uz0AYFI77ajZTbKFvbmW/ma8JB6Qlirye2Y= +Received: by 10.65.116.7 with SMTP id t7mr925611qbm; + Fri, 01 Sep 2006 12:49:44 -0700 (PDT) +Received: by 10.65.137.12 with HTTP; Fri, 1 Sep 2006 12:49:43 -0700 (PDT) +Message-ID: +Date: Fri, 1 Sep 2006 15:49:43 -0400 +From: "Merlin Moncure" +To: "Guillaume Cottenceau" +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +Cc: pgsql-performance@postgresql.org +In-Reply-To: <87veo7a5dn.fsf@meuh.mnc.lan> +MIME-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline +References: <87veo7a5dn.fsf@meuh.mnc.lan> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.299 tagged_above=0 required=5 tests=AWL, + DNS_FROM_RFC_ABUSE, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/8 +X-Sequence-Number: 20694 + +On 01 Sep 2006 19:00:52 +0200, Guillaume Cottenceau wrote: +> Hi, +> +> I've been looking at the results from the pg_statio* tables, to +> view the impact of increasing the shared buffers to increase +> performance. +> + +I think 'shared buffers' is one of the most overrated settings from a +performance standpoint. however you must ensure there is enough for +things the server does besides caching. It used to be a bigger deal +than it is in modern versionf of postgresql modern operating systems. + +merlin + +From pgsql-performance-owner@postgresql.org Fri Sep 1 18:43:55 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 712939FB6A6 + for ; + Fri, 1 Sep 2006 18:43:54 -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 37588-01-4 + for ; + Fri, 1 Sep 2006 18:43:20 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from exchange.g2switchworks.com (mail.g2switchworks.com + [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 29DBB9FB5B6 + for ; + Fri, 1 Sep 2006 17:01:44 -0300 (ADT) +Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com + ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; + Fri, 1 Sep 2006 20:01:42 +0000 +Received: from state.g2switchworks.com by mail.g2switchworks.com; + 01 Sep 2006 15:01:42 -0500 +Subject: Re: database bloat,non removovable rows, slow query +From: Scott Marlowe +To: Matteo Sgalaberni +Cc: Tom Lane , pgsql-performance@postgresql.org +In-Reply-To: <20060901172829.GX2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> + <4027.1157121810@sss.pgh.pa.us> <20060901172829.GX2266@sgala.com> +Content-Type: text/plain +Content-Transfer-Encoding: 7bit +Message-Id: <1157140902.4786.34.camel@state.g2switchworks.com> +Mime-Version: 1.0 +X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) +Date: Fri, 01 Sep 2006 15:01:42 -0500 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.091 tagged_above=0 required=5 tests=AWL, SPF_PASS, + UNPARSEABLE_RELAY +X-Spam-Level: +X-Archive-Number: 200609/9 +X-Sequence-Number: 20695 + +On Fri, 2006-09-01 at 12:28, Matteo Sgalaberni wrote: +> On Fri, Sep 01, 2006 at 10:43:30AM -0400, Tom Lane wrote: +> > Matteo Sgalaberni writes: +> > > 22 daemons that have a persistent connection to this database(all +> > > connection are in "idle"(no transaction opened). +> > +> > You may think that, but you are wrong. +> Ok. I stopped all clients. No connections to this database. Only psql +> console. Made vacuum +> full/freeze all cominations... again dead rows non removable. Nothing +> changed as in production. +> +> this is my postgres config: +> +> http://pastebin.com/781480 +> +> I read a lot about bloat tables related to +> not appropriate fsm settings... can be the mine a case of +> misconfiguration of these parameters? + +Something is holding a lock, somewhere. + +Have you tried shutting down and restarting the database to see if you +can get it to vacuum that way? You're not in a transaction in psql, +right? + +From pgsql-performance-owner@postgresql.org Fri Sep 1 18:44:53 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 2DCB89FB6B0 + for ; + Fri, 1 Sep 2006 18:44:53 -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 36074-05 for + ; + Fri, 1 Sep 2006 18:43:58 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 230EB9FA0B9 + for ; + Fri, 1 Sep 2006 17:02:43 -0300 (ADT) +Received: (qmail 21524 invoked from network); 1 Sep 2006 20:02:43 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 1 Sep 2006 20:02:43 -0000 +In-Reply-To: <87veo7a5dn.fsf@meuh.mnc.lan> +References: <87veo7a5dn.fsf@meuh.mnc.lan> +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: <3743D7B4-2749-41C3-ADE1-39B86F7C98D4@fastcrypt.com> +Cc: pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +Date: Fri, 1 Sep 2006 16:02:41 -0400 +To: Guillaume Cottenceau +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.04 tagged_above=0 required=5 tests=AWL, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/10 +X-Sequence-Number: 20696 + +Guillaume + +1G is really not a significant amount of memory these days, + +That said 6-10% of available memory should be given to an 8.0 or +older version of postgresql + +Newer versions work better around 25% + +I'm not sure what you mean by mechanically removed from effective_cache + +effective cache is really a representation of shared buffers plus OS +cache + +Dave +On 1-Sep-06, at 1:00 PM, Guillaume Cottenceau wrote: + +> Hi, +> +> I've been looking at the results from the pg_statio* tables, to +> view the impact of increasing the shared buffers to increase +> performance. +> +> As expected, increasing from the default by a factor of 10~20 +> moves table/index disk blocks reads to cache hits, but the +> overall service time of my test page is not changed (I'm testing +> with a set of queries implying an increase of 170,000 of +> sum(heap_blks_hit) and 2,000 of sum(idx_blks_hit) from +> pg_statio_user_tables). +> +> I've seen that documentation says: +> +> data that is not in the PostgreSQL buffer cache may still +> reside in the kernel's I/O cache, and may therefore still be +> fetched without requiring a physical read +> +> I guess this is the best explanation (btw, my test machine runs +> Linux 2.6 on 1G of RAM), but I'm still wondering what should be +> expected from moving caching from OS filesystem to PG - probably +> PG can "cleverly" flush its cache when it is full (e.g. table +> data before index data maybe?), whereas the OS will do it +> "blindly", but I'm wondering about the limits of this behaviour, +> particularly considering that being "very clever" about cache +> flush would probably need realtime query statistics which I am +> not sure PG does. +> +> After all, memory added to shared buffers should be mecanically +> removed from effective cache size (or others), so I cannot just +> increase it until the OS cannot cache anymore :) +> +> -- +> Guillaume Cottenceau +> +> ---------------------------(end of +> broadcast)--------------------------- +> TIP 4: Have you searched our list archives? +> +> http://archives.postgresql.org +> + + +From pgsql-bugs-owner@postgresql.org Sun Sep 3 19:36:01 2006 +X-Original-To: pgsql-bugs-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 21ADC9FB492; + Fri, 1 Sep 2006 19:50:00 -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 48404-06-2; Fri, 1 Sep 2006 19:48:55 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) + by postgresql.org (Postfix) with ESMTP id E35B99FB72F; + Fri, 1 Sep 2006 18:56:28 -0300 (ADT) +Received: by floppy.pyrenet.fr (Postfix, from userid 106) + id D8D95308E6; Fri, 1 Sep 2006 23:56:27 +0200 (MET DST) +From: "weisong44@gmail.com" +X-Newsgroups: pgsql.performance,pgsql.bugs +Subject: Hanging queries on Windows 2003 SP1 +Date: 1 Sep 2006 14:56:20 -0700 +Organization: http://groups.google.com +Lines: 17 +Message-ID: <1157147780.568274.141690@e3g2000cwe.googlegroups.com> +Mime-Version: 1.0 +Content-Type: text/plain; charset="iso-8859-1" +X-Complaints-To: groups-abuse@google.com +User-Agent: G2/0.2 +X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; + rv:1.8.0.6) Gecko/20060728 + Firefox/1.5.0.6,gzip(gfe),gzip(gfe) +Complaints-To: groups-abuse@google.com +Injection-Info: e3g2000cwe.googlegroups.com; posting-host=171.69.69.228; + posting-account=Q2r5qg0AAABoCUxgx_Uyibx16xbfGOxg +To: pgsql-bugs@postgresql.org pgsql-performance@postgresql.org +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/9 +X-Sequence-Number: 15685 + +Hi, + +We are seeing hanging queries on Windows 2003 Server SP1 with dual CPU, +looks like one of the process is blocked. In a lot of cases, the whole +DB is blocked if this process is holding important locks. + +Looks like this issue was discussed in the following thread a few month +ago, but didn't seem to have a solution mention. I would liek to know +if there is a patch for this already? + +http://archives.postgresql.org/pgsql-performance/2006-03/msg00129.php + +I would appreciate your feedbaek, + +Thanks, +Wei + + +From pgsql-performance-owner@postgresql.org Fri Sep 1 20:35:32 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id DA7759FB396 + for ; + Fri, 1 Sep 2006 20:35:31 -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 53982-01-8 + for ; + Fri, 1 Sep 2006 20:34:50 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 0944B9FB277 + for ; + Fri, 1 Sep 2006 20:22:54 -0300 (ADT) +Received: (qmail 22863 invoked from network); 1 Sep 2006 23:22:53 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 1 Sep 2006 23:22:53 -0000 +In-Reply-To: +References: <87veo7a5dn.fsf@meuh.mnc.lan> + +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: +Cc: "Guillaume Cottenceau" , + pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +Date: Fri, 1 Sep 2006 19:22:51 -0400 +To: Merlin Moncure +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.039 tagged_above=0 required=5 tests=AWL, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/11 +X-Sequence-Number: 20697 + + +On 1-Sep-06, at 3:49 PM, Merlin Moncure wrote: + +> On 01 Sep 2006 19:00:52 +0200, Guillaume Cottenceau wrote: +>> Hi, +>> +>> I've been looking at the results from the pg_statio* tables, to +>> view the impact of increasing the shared buffers to increase +>> performance. +>> +> +> I think 'shared buffers' is one of the most overrated settings from a +> performance standpoint. however you must ensure there is enough for +> things the server does besides caching. It used to be a bigger deal +> than it is in modern versionf of postgresql modern operating systems. +> +> merlin +> +So if shared buffers is the most overrated, what do you consider the +proper way of tuning ? +> ---------------------------(end of +> broadcast)--------------------------- +> TIP 9: In versions below 8.0, the planner will ignore your desire to +> choose an index scan if your joining column's datatypes do not +> match +> + + +From pgsql-performance-owner@postgresql.org Fri Sep 1 21:25:25 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id F194C9FB34F + for ; + Fri, 1 Sep 2006 21:25:24 -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 55423-09-2 + for ; + Fri, 1 Sep 2006 21:24:29 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from lists.commandprompt.com (host-130.commandprompt.net + [207.173.203.130]) + by postgresql.org (Postfix) with ESMTP id B3D999FB291 + for ; + Fri, 1 Sep 2006 21:24:16 -0300 (ADT) +Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net + [67.76.146.141]) (authenticated bits=0) + by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k820O8Gn011154 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); + Fri, 1 Sep 2006 17:24:09 -0700 +Message-ID: <44F8CF32.9040606@commandprompt.com> +Date: Fri, 01 Sep 2006 17:24:18 -0700 +From: "Joshua D. Drake" +Organization: Command Prompt, Inc. +User-Agent: Thunderbird 1.5.0.5 (X11/20060728) +MIME-Version: 1.0 +To: Dave Cramer +CC: Merlin Moncure , Guillaume Cottenceau , + pgsql-performance@postgresql.org +Subject: Re: increasing shared buffers: how much should be removed +References: <87veo7a5dn.fsf@meuh.mnc.lan> + + +In-Reply-To: +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: ClamAV version 0.88.3, + clamav-milter version 0.88.3 on projects.commandprompt.com +X-Virus-Status: Clean +X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by + milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); + Fri, 01 Sep 2006 17:24:09 -0700 (PDT) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.202 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/12 +X-Sequence-Number: 20698 + +>> +>> I think 'shared buffers' is one of the most overrated settings from a +>> performance standpoint. however you must ensure there is enough for +>> things the server does besides caching. It used to be a bigger deal +>> than it is in modern versionf of postgresql modern operating systems. + +Previous to 8.1 I would agree with you, but as of 8.1 it is probably the +most underrated. + +Joshua D. Drake + + +>> +>> merlin +>> +> So if shared buffers is the most overrated, what do you consider the +> proper way of tuning ? +>> ---------------------------(end of broadcast)--------------------------- +>> TIP 9: In versions below 8.0, the planner will ignore your desire to +>> choose an index scan if your joining column's datatypes do not +>> match +>> +> +> +> ---------------------------(end of broadcast)--------------------------- +> TIP 1: if posting/reading through Usenet, please send an appropriate +> subscribe-nomail command to majordomo@postgresql.org so that your +> message can get through to the mailing list cleanly +> + + +-- + + === The PostgreSQL Company: Command Prompt, Inc. === +Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 + Providing the most comprehensive PostgreSQL solutions since 1997 + http://www.commandprompt.com/ + + + +From pgsql-performance-owner@postgresql.org Sat Sep 2 05:37:35 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 49F039FB3F2 + for ; + Sat, 2 Sep 2006 05:37:33 -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 96227-01 for + ; + Sat, 2 Sep 2006 05:37:27 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from folium.sgala.coma (fw-nat.workzone.ovus.it [83.211.167.226]) + by postgresql.org (Postfix) with ESMTP id DF79C9FB3C8 + for ; + Sat, 2 Sep 2006 05:37:27 -0300 (ADT) +Received: by folium.sgala.coma (Postfix, from userid 1000) + id 962E82FA887; Sat, 2 Sep 2006 10:37:25 +0200 (CEST) +Date: Sat, 2 Sep 2006 10:37:25 +0200 +From: Matteo Sgalaberni +To: Tom Lane +Cc: pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +Message-ID: <20060902083725.GB2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <12756.1157132120@sss.pgh.pa.us> +X-Operating-System: Linux folium 2.4.20-3-686 +User-Agent: Mutt/1.5.11+cvs20060126 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.16 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/13 +X-Sequence-Number: 20699 + +On Fri, Sep 01, 2006 at 01:35:20PM -0400, Tom Lane wrote: +> Matteo Sgalaberni writes: +> > Ok. I stopped all clients. No connections to this database. +> +> When you say "this database", do you mean the whole postmaster cluster, +> or just the one database? Open transactions in other databases of the +> same cluster can be a problem. +> +AGH!!!! AGHR!!! + +A my collegue JDBC application that stay in "idle intransaction" 24h/24h +(but in another database, non in the bloated-reported db...)! + +I killed it now(jdbc app). + +vacuumed full and PG have cleaned all!! So if I have a idle transaction in +one database of the cluster it "lock" vacuums of all databases of the cluster. + +Good to know this...but why this behaviour? it'is lovely...:) + +Tom , can you explain why?... + +Thanks a lot!! + +Matteo + + +From pgsql-performance-owner@postgresql.org Sat Sep 2 11:16:45 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id DF34A9FB504 + for ; + Sat, 2 Sep 2006 11:16:44 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 34181-06 for + ; + Sat, 2 Sep 2006 14:16:40 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 48AB99FB503 + for ; + Sat, 2 Sep 2006 11:16:39 -0300 (ADT) +Received: (qmail 28357 invoked from network); 2 Sep 2006 14:16:38 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 2 Sep 2006 14:16:38 -0000 +In-Reply-To: <20060902083725.GB2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: +Cc: Tom Lane , + pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +Date: Sat, 2 Sep 2006 10:16:36 -0400 +To: Matteo Sgalaberni +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/14 +X-Sequence-Number: 20700 + +Matteo, + +On 2-Sep-06, at 4:37 AM, Matteo Sgalaberni wrote: + +> On Fri, Sep 01, 2006 at 01:35:20PM -0400, Tom Lane wrote: +>> Matteo Sgalaberni writes: +>>> Ok. I stopped all clients. No connections to this database. +>> +>> When you say "this database", do you mean the whole postmaster +>> cluster, +>> or just the one database? Open transactions in other databases of +>> the +>> same cluster can be a problem. +>> +> AGH!!!! AGHR!!! +> +> A my collegue JDBC application that stay in "idle intransaction" +> 24h/24h +> (but in another database, non in the bloated-reported db...)! +> +> I killed it now(jdbc app). +this behaviour has been fixed in later versions of the jdbc driver +> +> vacuumed full and PG have cleaned all!! So if I have a idle +> transaction in +> one database of the cluster it "lock" vacuums of all databases of +> the cluster. +> +> Good to know this...but why this behaviour? it'is lovely...:) +> +> Tom , can you explain why?... +> +> Thanks a lot!! +> +> Matteo +> +> +> ---------------------------(end of +> broadcast)--------------------------- +> TIP 2: Don't 'kill -9' the postmaster +> + + +From pgsql-performance-owner@postgresql.org Sat Sep 2 11:21:28 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 6CF929FB505 + for ; + Sat, 2 Sep 2006 11:21:28 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 35014-07 for + ; + Sat, 2 Sep 2006 14:21:25 +0000 (UTC) +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 5BE629FB503 + for ; + Sat, 2 Sep 2006 11:21:24 -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 k82ELNo7002192; + Sat, 2 Sep 2006 10:21:23 -0400 (EDT) +To: Matteo Sgalaberni +cc: pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +In-reply-to: <20060902083725.GB2266@sgala.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> +Comments: In-reply-to Matteo Sgalaberni + message dated "Sat, 02 Sep 2006 10:37:25 +0200" +Date: Sat, 02 Sep 2006 10:21:23 -0400 +Message-ID: <2191.1157206883@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/15 +X-Sequence-Number: 20701 + +Matteo Sgalaberni writes: +> Good to know this...but why this behaviour? it'is lovely...:) + +Open transactions are tracked across the whole cluster. This is +necessary when vacuuming shared catalogs. In principle we could +track per-database xmin values as well, but the distributed overhead +that'd be added to *every* GetSnapshotData call is a bit worrisome. + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Mon Sep 4 00:53:40 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 5912F9FB249 + for ; + Mon, 4 Sep 2006 00:53:39 -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 11263-08 for + ; + Mon, 4 Sep 2006 00:53:29 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from linda-4.paradise.net.nz (linda-4.paradise.net.nz + [203.96.152.183]) + by postgresql.org (Postfix) with ESMTP id AB34D9FA60C + for ; + Mon, 4 Sep 2006 00:53:29 -0300 (ADT) +Received: from smtp-2.paradise.net.nz + (tclsnelb1-src-1.paradise.net.nz [203.96.152.172]) by + linda-4.paradise.net.nz (Paradise.net.nz) with ESMTP id + <0J510005NUT3UP@linda-4.paradise.net.nz> for + pgsql-performance@postgresql.org; Mon, 04 Sep 2006 15:53:27 +1200 (NZST) +Received: from [192.168.1.11] (218-101-28-46.dsl.clear.net.nz [218.101.28.46]) + by smtp-2.paradise.net.nz (Postfix) with ESMTP id B2AFF74C06B for + ; + Mon, 04 Sep 2006 15:53:26 +1200 (NZST) +Date: Mon, 04 Sep 2006 15:53:22 +1200 +From: Mark Kirkwood +Subject: Re: Postgress memory leak with JBoss3.2.6 and large DB +In-reply-to: <20060831095135.4292E9D7@dm17.mta.everyone.net> +To: pgsql-performance@postgresql.org +Message-id: <44FBA332.8020104@paradise.net.nz> +MIME-version: 1.0 +Content-type: text/plain; format=flowed; charset=ISO-8859-1 +Content-transfer-encoding: 7bit +User-Agent: Thunderbird 1.5.0.4 (X11/20060704) +References: <20060831095135.4292E9D7@dm17.mta.everyone.net> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.027 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/16 +X-Sequence-Number: 20702 + +Indika Maligaspe wrote: +> Hey guys, +> +> We are running a Linux 2.4 enterprise edition box with 6GB of RAM, +> **Postgres 8.0.3**. (snippage) +> + +You might want to consider upgrading to 8.0.8 (see below), and seeing if +the problem still persists. + + +> As you can see the postmaster users are taking way over the memory that +> should be taken. +> +> +> If any of you can give us some pointers we would really appreciate that +> and thanks in advance. +> + +I notice that there are a number of fixes for memory leaks since 8.0.3 - +8.0.4 and 8.0.8 is where I see 'em specifically (reading release notes +for 8.0.8). So you may be experiencing an issue that is fixed in the +current 8.0 releases! I recommend upgrading to 8.0.8. + +You didn't say what your HW was, but if you are on a 32-bit platform, +then a 2.4 kernel when you have >2G ram may leak noticeable amounts of +memory itself... + +Cheers + +Mark + + +From pgsql-performance-owner@postgresql.org Mon Sep 4 05:06:30 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 2ACB69FA236 + for ; + Mon, 4 Sep 2006 05:06:30 -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 50161-03-2 + for ; + Mon, 4 Sep 2006 05:06:23 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) + by postgresql.org (Postfix) with ESMTP id DCA999FB5AA + for ; + Mon, 4 Sep 2006 04:35:21 -0300 (ADT) +Received: from kingfisher.intern.logix-tt.com + (80-219-241-140.dclient.hispeed.ch [80.219.241.140]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by mail.logix-tt.com (Postfix) with ESMTP id 3B2DB656BE + for ; + Mon, 4 Sep 2006 09:37:27 +0200 (CEST) +Received: from [127.0.0.1] (localhost [127.0.0.1]) + by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 971CB18151EBC + for ; + Mon, 4 Sep 2006 09:35:13 +0200 (CEST) +Message-ID: <44FBD731.10105@logix-tt.com> +Date: Mon, 04 Sep 2006 09:35:13 +0200 +From: Markus Schaber +Organization: Logical Tracking and Tracing International AG, Switzerland +User-Agent: Thunderbird 1.5.0.5 (X11/20060812) +MIME-Version: 1.0 +To: pgsql-performance@postgresql.org +Subject: Re: database bloat,non removovable rows, slow query etc... +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> +In-Reply-To: <20060902083725.GB2266@sgala.com> +X-Enigmail-Version: 0.94.0.0 +Content-Type: text/plain; charset=ISO-8859-15 +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.16 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/17 +X-Sequence-Number: 20703 + +Hi, Matteo, + +Matteo Sgalaberni wrote: + +> A my collegue JDBC application that stay in "idle intransaction" 24h/24h + +Just a little note: For most applications, this can be fixed updating +the JDBC driver. Old versions had the behaviour of auto-opening a new +backend transaction on commit/rollback, whereas new versions delay that +until the first statement in the new transaction is sent. + +This won't fix applications that do a select and then sit idle for days +before committing/rolling back, however. Those should be fixed or use +autocommit mode. + +> Good to know this...but why this behaviour? it'is lovely...:) +> +> Tom , can you explain why?... + +It is because the transaction IDs are global per cluster. + +Markus + + +-- +Markus Schaber | Logical Tracking&Tracing International AG +Dipl. Inf. | Software Development GIS + +Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org + +From pgsql-bugs-owner@postgresql.org Mon Sep 4 08:39:47 2006 +X-Original-To: pgsql-bugs-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 201999FB252; + Mon, 4 Sep 2006 08:39:47 -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 61963-06; Mon, 4 Sep 2006 08:39:41 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mx-2.sollentuna.net (mx-2.sollentuna.net [195.84.163.199]) + by postgresql.org (Postfix) with ESMTP id 0D6DB9FB200; + Mon, 4 Sep 2006 08:39:42 -0300 (ADT) +Received: from ALGOL.sollentuna.se (janus.sollentuna.se [62.65.68.67]) + by mx-2.sollentuna.net (Postfix) with ESMTP + id C87FAF4081; Mon, 4 Sep 2006 13:39:40 +0200 (CEST) +Content-class: urn:content-classes:message +MIME-Version: 1.0 +Content-Type: text/plain; + charset="us-ascii" +Content-Transfer-Encoding: quoted-printable +X-MimeOLE: Produced By Microsoft Exchange V6.5 +Subject: Re: Hanging queries on Windows 2003 SP1 +Date: Mon, 4 Sep 2006 13:39:40 +0200 +Message-ID: <6BCB9D8A16AC4241919521715F4D8BCEA3561C@algol.sollentuna.se> +In-Reply-To: <1157147780.568274.141690@e3g2000cwe.googlegroups.com> +X-MS-Has-Attach: +X-MS-TNEF-Correlator: +Thread-Topic: [BUGS] Hanging queries on Windows 2003 SP1 +Thread-Index: AcbPqWP7Yb1E7VvFTTmaw3gg4S2W9wAbTX2Q +References: <1157147780.568274.141690@e3g2000cwe.googlegroups.com> +From: "Magnus Hagander" +To: , , + +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.174 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/15 +X-Sequence-Number: 15691 + +> Hi, +>=20 +> We are seeing hanging queries on Windows 2003 Server SP1 with dual +> CPU, looks like one of the process is blocked. In a lot of cases, +> the whole DB is blocked if this process is holding important locks. +>=20 +> Looks like this issue was discussed in the following thread a few +> month ago, but didn't seem to have a solution mention. I would liek +> to know if there is a patch for this already? +>=20 +> http://archives.postgresql.org/pgsql-performance/2006- +> 03/msg00129.php +>=20 + +There have been some fairly extensive changes in the semaphore code for +8.2. Any chance you can try the cvs snapshot version and see if the +problem exists there as well? + +//Magnus + +From pgsql-performance-owner@postgresql.org Mon Sep 4 09:09:48 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id A513A9FB252 + for ; + Mon, 4 Sep 2006 09:09:47 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 84737-04-5 + for ; + Mon, 4 Sep 2006 12:09:37 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) + by postgresql.org (Postfix) with ESMTP id DFF949FB2D9 + for ; + Mon, 4 Sep 2006 09:08:05 -0300 (ADT) +Received: from localhost (localhost [127.0.0.1]) + by mail.mnc.ch (Postfix) with ESMTP id F2D7BA8302; + Mon, 4 Sep 2006 14:13:23 +0200 (CEST) +Received: from mail.mnc.ch ([127.0.0.1]) + by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, + port 10025) with ESMTP + id 01704-01; Mon, 4 Sep 2006 14:13:22 +0200 (CEST) +Received: from meuh.mnc.lan (62-2-77-204.static.cablecom.ch [62.2.77.204]) + by mail.mnc.ch (Postfix) with ESMTP id 8F678A82B9; + Mon, 4 Sep 2006 14:13:22 +0200 (CEST) +Received: by meuh.mnc.lan (Postfix, from userid 1000) + id 239A11836F4; Mon, 4 Sep 2006 14:07:37 +0200 (CEST) +To: Dave Cramer +Cc: pgsql-performance@postgresql.org +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +References: <87veo7a5dn.fsf@meuh.mnc.lan> + <3743D7B4-2749-41C3-ADE1-39B86F7C98D4@fastcrypt.com> +X-Hashcash: 1:20:060904:pg@fastcrypt.com::MtxHOz/kqxxekdeL:01O8z +X-Hashcash: + 1:20:060904:pgsql-performance@postgresql.org::/Ghy1fnEJKvlVij9:000000000000000000000000000004ag9 +From: Guillaume Cottenceau +Date: 04 Sep 2006 14:07:37 +0200 +In-Reply-To: <3743D7B4-2749-41C3-ADE1-39B86F7C98D4@fastcrypt.com> +Message-ID: <87fyf7hm2e.fsf@meuh.mnc.lan> +Lines: 37 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: amavisd-new at mnc.ch +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/19 +X-Sequence-Number: 20705 + +Dave Cramer writes: + +> Guillaume +> +> 1G is really not a significant amount of memory these days, + +Yeah though we have 2G or 4G of RAM in our servers (and not only +postgres running on it). + +> That said 6-10% of available memory should be given to an 8.0 or +> older version of postgresql +> +> Newer versions work better around 25% +> +> I'm not sure what you mean by mechanically removed from effective_cache + +I mean that when you allocate more memory to applications, the +consequence is less memory the OS will be able to use for disk +cache. + +> effective cache is really a representation of shared buffers plus OS +> cache + +Are you sure the shared buffers should be counted in? As I +understand the documentation, they should not (as shared buffers +is allocated memory for the OS, not part of "kernel's disk +cache"): + + Sets the planner's assumption about the effective size of the + disk cache (that is, the portion of the kernel's disk cache + that will be used for PostgreSQL data files). This is + measured in disk pages, which are normally 8192 bytes each. + The default is 1000. + +-- +Guillaume Cottenceau +Create your personal SMS or WAP Service - visit http://mobilefriends.ch/ + +From pgsql-performance-owner@postgresql.org Mon Sep 4 09:12:59 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id E5D599FB2C7 + for ; + Mon, 4 Sep 2006 09:12:58 -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 66243-03-2 + for ; + Mon, 4 Sep 2006 09:12:48 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) + by postgresql.org (Postfix) with ESMTP id D1A719FB2DC + for ; + Mon, 4 Sep 2006 09:10:40 -0300 (ADT) +Received: from localhost (localhost [127.0.0.1]) + by mail.mnc.ch (Postfix) with ESMTP id 4F03CA8302; + Mon, 4 Sep 2006 14:16:00 +0200 (CEST) +Received: from mail.mnc.ch ([127.0.0.1]) + by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, + port 10025) with ESMTP + id 01454-06; Mon, 4 Sep 2006 14:15:58 +0200 (CEST) +Received: from meuh.mnc.lan (62-2-77-204.static.cablecom.ch [62.2.77.204]) + by mail.mnc.ch (Postfix) with ESMTP id EB9D8A82C6; + Mon, 4 Sep 2006 14:15:58 +0200 (CEST) +Received: by meuh.mnc.lan (Postfix, from userid 1000) + id 81EB91836F4; Mon, 4 Sep 2006 14:10:14 +0200 (CEST) +To: "Merlin Moncure" +Cc: pgsql-performance@postgresql.org +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +References: <87veo7a5dn.fsf@meuh.mnc.lan> + +X-Hashcash: + 1:20:060904:mmoncure@gmail.com::PkUVHbtC3WqGw/QJ:0000000000000000000000000000000000000000000AeF9 +X-Hashcash: + 1:20:060904:pgsql-performance@postgresql.org::6am9g0FufJryL/Te:000000000000000000000000000008O3G +From: Guillaume Cottenceau +Date: 04 Sep 2006 14:10:14 +0200 +In-Reply-To: +Message-ID: <87ac5fhly1.fsf@meuh.mnc.lan> +Lines: 21 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: amavisd-new at mnc.ch +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.182 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/20 +X-Sequence-Number: 20706 + +"Merlin Moncure" writes: + +> On 01 Sep 2006 19:00:52 +0200, Guillaume Cottenceau wrote: +> > Hi, +> > +> > I've been looking at the results from the pg_statio* tables, to +> > view the impact of increasing the shared buffers to increase +> > performance. +> > +> +> I think 'shared buffers' is one of the most overrated settings from a +> performance standpoint. however you must ensure there is enough for +> things the server does besides caching. It used to be a bigger deal + +"Beside caching".. It's unfornatunate that the documentation on +pg.org is very vague about the actual use(s) of the shared +buffers :/ + +-- +Guillaume Cottenceau +Create your personal SMS or WAP Service - visit http://mobilefriends.ch/ + +From pgsql-performance-owner@postgresql.org Mon Sep 4 12:14:51 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 5C1E99FB1F4 + for ; + Mon, 4 Sep 2006 12:14:51 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 25482-08 for + ; + Mon, 4 Sep 2006 15:14:47 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 1331A9FB28A + for ; + Mon, 4 Sep 2006 12:14:46 -0300 (ADT) +Received: (qmail 13126 invoked from network); 4 Sep 2006 15:14:45 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 4 Sep 2006 15:14:45 -0000 +In-Reply-To: <87fyf7hm2e.fsf@meuh.mnc.lan> +References: <87veo7a5dn.fsf@meuh.mnc.lan> + <3743D7B4-2749-41C3-ADE1-39B86F7C98D4@fastcrypt.com> + <87fyf7hm2e.fsf@meuh.mnc.lan> +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: +Cc: pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: increasing shared buffers: how much should be removed from OS + filesystem cache? +Date: Mon, 4 Sep 2006 11:14:44 -0400 +To: Guillaume Cottenceau +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/21 +X-Sequence-Number: 20707 + + +On 4-Sep-06, at 8:07 AM, Guillaume Cottenceau wrote: + +> Dave Cramer writes: +> +>> Guillaume +>> +>> 1G is really not a significant amount of memory these days, +> +> Yeah though we have 2G or 4G of RAM in our servers (and not only +> postgres running on it). +> +>> That said 6-10% of available memory should be given to an 8.0 or +>> older version of postgresql +>> +>> Newer versions work better around 25% +>> +>> I'm not sure what you mean by mechanically removed from +>> effective_cache +> +> I mean that when you allocate more memory to applications, the +> consequence is less memory the OS will be able to use for disk +> cache. +> +>> effective cache is really a representation of shared buffers plus OS +>> cache +> +> Are you sure the shared buffers should be counted in? As I +> understand the documentation, they should not (as shared buffers +> is allocated memory for the OS, not part of "kernel's disk +> cache"): +Yes, I am sure this should be counted, however effective_cache is not +actually allocating anything so it doesn't have to be exact, but it +has to be in the correct order of magnitude +> +> Sets the planner's assumption about the effective size of the +> disk cache (that is, the portion of the kernel's disk cache +> that will be used for PostgreSQL data files). This is +> measured in disk pages, which are normally 8192 bytes each. +> The default is 1000. +> +> -- +> Guillaume Cottenceau +> Create your personal SMS or WAP Service - visit http:// +> mobilefriends.ch/ +> + + +From pgsql-performance-owner@postgresql.org Mon Sep 4 17:44:44 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 92D849FB2F6 + for ; + Mon, 4 Sep 2006 17:44:43 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 59061-10 for + ; + Mon, 4 Sep 2006 20:44:40 +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id 9942A9FB2E8 + for ; + Mon, 4 Sep 2006 17:42:43 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from mx7.mail.ru (mx7.mail.ru [194.67.23.27]) + by svr4.postgresql.org (Postfix) with ESMTP id AFC1C5AF8C7 + for ; + Mon, 4 Sep 2006 20:42:42 +0000 (GMT) +Received: from [213.148.25.226] (port=5282 helo=[192.168.0.2]) + by mx7.mail.ru with asmtp id 1GKLHE-000NwZ-00 + for pgsql-performance@postgresql.org; Tue, 05 Sep 2006 00:42:40 +0400 +Message-ID: <44FC8FB4.4030706@mail.ru> +Date: Tue, 05 Sep 2006 00:42:28 +0400 +From: Roman Krylov +User-Agent: Thunderbird 1.5.0.5 (X11/20060719) +MIME-Version: 1.0 +To: pgsql-performance@postgresql.org +Subject: 64bit vs 32bit build on amd64 +Content-Type: text/plain; charset=KOI8-R; format=flowed +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=4.398 tagged_above=0 required=5 + tests=RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_SORBS_WEB, SPF_SOFTFAIL +X-Spam-Level: **** +X-Archive-Number: 200609/23 +X-Sequence-Number: 20709 + +Hi. +My config: +gentoo linux "2005.1" on amd64x2 in 64-bit mode, +kernel 2.6.16.12 +glibc 3.3.5(NPTL), +gcc 3.4.3. +I had not used portage for building. +I built two versions of postgres from sources: +postgresql-8.1.4 native(64bit) +and 32-bit with CFLAGS=... -m32, and "LD = +/usr/x86_64-pc-linux-gnu/bin/ld -melf_i386" in src/Makefile.global. +32-bit build runs much faster than 64 apparently. +What benchmark utility should I run to provide more concrete info (numbers)? +What could be the reason of that difference in performance? + +Regards, + Roman. + + +From pgsql-performance-owner@postgresql.org Mon Sep 4 19:38:37 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id E06929FB2D2 + for ; + Mon, 4 Sep 2006 19:38:36 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 06606-08 for + ; + Mon, 4 Sep 2006 22:38:34 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) + by postgresql.org (Postfix) with ESMTP id E0C239FB2D1 + for ; + Mon, 4 Sep 2006 19:38:33 -0300 (ADT) +Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) + by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) + id 1GKMhD-0001qr-00; Mon, 04 Sep 2006 18:13:35 -0400 +To: Tom Lane +Cc: Matteo Sgalaberni , pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> <2191.1157206883@sss.pgh.pa.us> +From: Gregory Stark +In-Reply-To: <2191.1157206883@sss.pgh.pa.us> +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +Date: 04 Sep 2006 18:13:34 -0400 +Message-ID: <87ejur1drl.fsf@stark.xeocode.com> +Lines: 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.384 tagged_above=0 required=5 tests=SPF_SOFTFAIL +X-Spam-Level: * +X-Archive-Number: 200609/24 +X-Sequence-Number: 20710 + +Tom Lane writes: + +> Matteo Sgalaberni writes: +> > Good to know this...but why this behaviour? it'is lovely...:) +> +> Open transactions are tracked across the whole cluster. This is +> necessary when vacuuming shared catalogs. In principle we could +> track per-database xmin values as well, but the distributed overhead +> that'd be added to *every* GetSnapshotData call is a bit worrisome. + +Don't we do that now in CVS (ie, in 8.2)? + +-- + Gregory Stark + EnterpriseDB http://www.enterprisedb.com + + +From pgsql-performance-owner@postgresql.org Mon Sep 4 19:47:49 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id D429C9FB1C8 + for ; + Mon, 4 Sep 2006 19:47:48 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 21752-04 for + ; + Mon, 4 Sep 2006 22:47:39 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from lists.commandprompt.com (host-130.commandprompt.net + [207.173.203.130]) + by postgresql.org (Postfix) with ESMTP id 3A2979FB2D3 + for ; + Mon, 4 Sep 2006 19:47:39 -0300 (ADT) +Received: from alvh.no-ip.org (201-221-202-127.bk11-dsl.surnet.cl + [201.221.202.127]) (authenticated bits=0) + by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k84MlRht019908; + Mon, 4 Sep 2006 15:47:28 -0700 +Received: by alvh.no-ip.org (Postfix, from userid 1000) + id C279BC295B1; Mon, 4 Sep 2006 18:47:16 -0400 (CLT) +Date: Mon, 4 Sep 2006 18:47:16 -0400 +From: Alvaro Herrera +To: Gregory Stark +Cc: Tom Lane , Matteo Sgalaberni , + pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +Message-ID: <20060904224716.GB14107@alvh.no-ip.org> +Mail-Followup-To: Gregory Stark , + Tom Lane , Matteo Sgalaberni , + pgsql-performance@postgresql.org +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> <2191.1157206883@sss.pgh.pa.us> + <87ejur1drl.fsf@stark.xeocode.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87ejur1drl.fsf@stark.xeocode.com> +User-Agent: Mutt/1.5.13 (2006-08-11) +X-Virus-Scanned: ClamAV version 0.88.3, + clamav-milter version 0.88.3 on projects.commandprompt.com +X-Virus-Status: Clean +X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by + milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); + Mon, 04 Sep 2006 15:47:40 -0700 (PDT) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/25 +X-Sequence-Number: 20711 + +Gregory Stark wrote: +> Tom Lane writes: +> +> > Matteo Sgalaberni writes: +> > > Good to know this...but why this behaviour? it'is lovely...:) +> > +> > Open transactions are tracked across the whole cluster. This is +> > necessary when vacuuming shared catalogs. In principle we could +> > track per-database xmin values as well, but the distributed overhead +> > that'd be added to *every* GetSnapshotData call is a bit worrisome. +> +> Don't we do that now in CVS (ie, in 8.2)? + +No, we don't. + +-- +Alvaro Herrera http://www.CommandPrompt.com/ +The PostgreSQL Company - Command Prompt, Inc. + +From pgsql-performance-owner@postgresql.org Mon Sep 4 21:30:48 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id E940E9FB2FF + for ; + Mon, 4 Sep 2006 21:30:47 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 58387-04 for + ; + Tue, 5 Sep 2006 00:30:43 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) + by postgresql.org (Postfix) with ESMTP id 3697D9FB1C8 + for ; + Mon, 4 Sep 2006 21:30:43 -0300 (ADT) +Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) + by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) + id 1GKOpT-0002EC-00; Mon, 04 Sep 2006 20:30:15 -0400 +To: Alvaro Herrera +Cc: Gregory Stark , Tom Lane , + Matteo Sgalaberni , pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> <2191.1157206883@sss.pgh.pa.us> + <87ejur1drl.fsf@stark.xeocode.com> + <20060904224716.GB14107@alvh.no-ip.org> +From: Gregory Stark +In-Reply-To: <20060904224716.GB14107@alvh.no-ip.org> +Date: 04 Sep 2006 20:30:15 -0400 +Message-ID: <878xkz17fs.fsf@stark.xeocode.com> +Lines: 27 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.384 tagged_above=0 required=5 tests=SPF_SOFTFAIL +X-Spam-Level: * +X-Archive-Number: 200609/26 +X-Sequence-Number: 20712 + + +Alvaro Herrera writes: + +> Gregory Stark wrote: +> > Tom Lane writes: +> > +> > > Matteo Sgalaberni writes: +> > > > Good to know this...but why this behaviour? it'is lovely...:) +> > > +> > > Open transactions are tracked across the whole cluster. This is +> > > necessary when vacuuming shared catalogs. In principle we could +> > > track per-database xmin values as well, but the distributed overhead +> > > that'd be added to *every* GetSnapshotData call is a bit worrisome. +> > +> > Don't we do that now in CVS (ie, in 8.2)? +> +> No, we don't. + +I must be misunderstanding Tom's comment then. + +What I'm referring to is lazy_vacuum_rel() calls vacuum_set_xid_limits with +the relisshared flag of the relation. vacuum_set_xid_limits passes that to +GetOldestXmin as the allDbs parameter. GetOldestXmin ignores transactions not +connected to the same database unless allDbs is true. + +-- +greg + + +From pgsql-performance-owner@postgresql.org Tue Sep 5 00:17:20 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 26C3A9FB2FC + for ; + Tue, 5 Sep 2006 00:17:19 -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 67183-10 for + ; + Tue, 5 Sep 2006 00:17:09 -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 49BF19FB2F8 + for ; + Tue, 5 Sep 2006 00:17:09 -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 k853H6U7018083; + Mon, 4 Sep 2006 23:17:06 -0400 (EDT) +To: Gregory Stark +cc: Alvaro Herrera , + Matteo Sgalaberni , pgsql-performance@postgresql.org +Subject: Re: database bloat, non removovable rows, + slow query etc... [RESOLVED] +In-reply-to: <878xkz17fs.fsf@stark.xeocode.com> +References: <20060901123915.GT2266@sgala.com> <4027.1157121810@sss.pgh.pa.us> + <20060901172829.GX2266@sgala.com> <12756.1157132120@sss.pgh.pa.us> + <20060902083725.GB2266@sgala.com> <2191.1157206883@sss.pgh.pa.us> + <87ejur1drl.fsf@stark.xeocode.com> + <20060904224716.GB14107@alvh.no-ip.org> + <878xkz17fs.fsf@stark.xeocode.com> +Comments: In-reply-to Gregory Stark + message dated "04 Sep 2006 20:30:15 -0400" +Date: Mon, 04 Sep 2006 23:17:06 -0400 +Message-ID: <18082.1157426226@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.117 tagged_above=0 required=5 tests=AWL, + SPF_HELO_PASS, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/27 +X-Sequence-Number: 20713 + +Gregory Stark writes: +> I must be misunderstanding Tom's comment then. + +> What I'm referring to is lazy_vacuum_rel() calls vacuum_set_xid_limits with +> the relisshared flag of the relation. vacuum_set_xid_limits passes that to +> GetOldestXmin as the allDbs parameter. GetOldestXmin ignores transactions not +> connected to the same database unless allDbs is true. + +The problem is the indirect effect of other backends' xmin values, +which are computed across all live backends. + +In the current structure, it's hard to see how to fix this except +by making each backend compute and advertise both a global and +database-local xmin. This seems a bit ugly. Also, someone asked +recently whether we could avoid counting prepared xacts when figuring +vacuum cutoffs, which seems a fair question --- but again, how to do +that without doubling the number of advertised xmin values yet again? + +I'm starting to feel that we've reached the limits of this system of +accounting for live XIDs, but I have no idea what the next step might +look like... + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Tue Sep 5 01:01:16 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 84B7A9FB29A + for ; + Tue, 5 Sep 2006 01:01:15 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 09210-04 for + ; + Tue, 5 Sep 2006 04:01:02 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from omta14.mta.everyone.net (sitemail2.everyone.net + [216.200.145.36]) + by postgresql.org (Postfix) with ESMTP id C55809FB283 + for ; + Tue, 5 Sep 2006 01:00:59 -0300 (ADT) +Received: from dm21.mta.everyone.net (bigiplb-dsnat [172.16.0.19]) + by omta14.mta.everyone.net (Postfix) with ESMTP + id CA79A404F7; Mon, 4 Sep 2006 21:00:58 -0700 (PDT) +X-Eon-Dm: dm21 +Received: by dm21.mta.everyone.net (EON-AUTHRELAY2 - cbbd48ba) + id dm21.44f8bfc6.3b126; Mon, 4 Sep 2006 21:00:57 -0700 +X-Eon-Sig: AQJKldRE/PZ50wCxQAIAAAAC,f9e35b327b00aee07ec1c3175efd04c4 +From: "Indika Maligaspe" +To: "'Mark Kirkwood'" , + +Subject: Re: Postgress memory leak with JBoss3.2.6 and large DB +Date: Tue, 5 Sep 2006 09:32:04 +0530 +MIME-Version: 1.0 +Content-Type: text/plain; + charset="us-ascii" +Content-Transfer-Encoding: 7bit +X-Mailer: Microsoft Office Outlook, Build 11.0.5510 +Thread-Index: AcbP1czx4+KcUF+DTdScTiPuN75qOAAyXVzA +X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 +In-Reply-To: <44FBA332.8020104@paradise.net.nz> +Message-Id: <20060904210058.6BAD4ECF@dm21.mta.everyone.net> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/28 +X-Sequence-Number: 20714 + +Hi Guys, + We found the issue regarding our memory leak. It was the query. It +seams were using functions with fetch cursors on large data sets and the +cursors were not getting closed properly. Hence the memory was building up. +So I guess this was an application error. In fact we bought the Query memory +from 1.4 GB to 2 MB......... + +Thanks for all the help guys. Because by reading all your comments I was +able to understand a lot about Postgres memory settings. + + +K.Indika Maligaspe + +-----Original Message----- +From: pgsql-performance-owner@postgresql.org +[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Mark Kirkwood +Sent: Monday, September 04, 2006 9:23 AM +To: pgsql-performance@postgresql.org +Subject: Re: [PERFORM] Postgress memory leak with JBoss3.2.6 and large DB + +Indika Maligaspe wrote: +> Hey guys, +> +> We are running a Linux 2.4 enterprise edition box with 6GB of RAM, +> **Postgres 8.0.3**. (snippage) +> + +You might want to consider upgrading to 8.0.8 (see below), and seeing if +the problem still persists. + + +> As you can see the postmaster users are taking way over the memory that +> should be taken. +> +> +> If any of you can give us some pointers we would really appreciate that +> and thanks in advance. +> + +I notice that there are a number of fixes for memory leaks since 8.0.3 - +8.0.4 and 8.0.8 is where I see 'em specifically (reading release notes +for 8.0.8). So you may be experiencing an issue that is fixed in the +current 8.0 releases! I recommend upgrading to 8.0.8. + +You didn't say what your HW was, but if you are on a 32-bit platform, +then a 2.4 kernel when you have >2G ram may leak noticeable amounts of +memory itself... + +Cheers + +Mark + + +---------------------------(end of broadcast)--------------------------- +TIP 4: Have you searched our list archives? + + http://archives.postgresql.org + + +From pgsql-bugs-owner@postgresql.org Thu Sep 7 12:39:03 2006 +X-Original-To: pgsql-bugs-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 749C19FB209 + for ; + Tue, 5 Sep 2006 03:31:30 -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 81324-08 for ; + Tue, 5 Sep 2006 03:31:26 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.227]) + by postgresql.org (Postfix) with ESMTP id CFA3E9FB205 + for ; Tue, 5 Sep 2006 03:31:26 -0300 (ADT) +Received: by qb-out-0506.google.com with SMTP id e11so509317qba + for ; Mon, 04 Sep 2006 23:31:26 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; + b=UPXzlXLTxffo/tB69mrnlRmxsQ0MXvyhRVDdBW/cu5YqT8huADx4iIH4TKO+bfg/PPe2SbKEv32PCpdsgYk5E5LeZKXyrJxCl7mre/a2dN4M5k9ff1fquQTklWVDpNStfoVlUQY17+DV+AFsU7fAFqAJ+1B2cTUUuJznGvCzMZ8= +Received: by 10.90.79.6 with SMTP id c6mr1212116agb; + Mon, 04 Sep 2006 23:31:25 -0700 (PDT) +Received: by 10.90.106.7 with HTTP; Mon, 4 Sep 2006 23:31:24 -0700 (PDT) +Message-ID: <13dc47610609042331y4646d191j1ee5fc4d83bc569b@mail.gmail.com> +Date: Mon, 4 Sep 2006 23:31:24 -0700 +From: "Wei Song" +To: "Magnus Hagander" +Subject: Re: Hanging queries on Windows 2003 SP1 +Cc: pgsql-bugs@postgresql.org, pgsql-performance@postgresql.org +In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCEA3561C@algol.sollentuna.se> +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_Part_118540_16090014.1157437884576" +References: <1157147780.568274.141690@e3g2000cwe.googlegroups.com> + <6BCB9D8A16AC4241919521715F4D8BCEA3561C@algol.sollentuna.se> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.932 tagged_above=0 required=5 tests=HTML_30_40, + HTML_MESSAGE, RCVD_IN_BL_SPAMCOP_NET, SPF_PASS +X-Spam-Level: * +X-Archive-Number: 200609/31 +X-Sequence-Number: 15707 + +------=_Part_118540_16090014.1157437884576 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +Hi Magnus, + +Sure, I could try that out. Is there a place to download a 8.2 image to +bypass setting up the tool chain? + +-Wei + + +On 9/4/06, Magnus Hagander wrote: +> +> > Hi, +> > +> > We are seeing hanging queries on Windows 2003 Server SP1 with dual +> > CPU, looks like one of the process is blocked. In a lot of cases, +> > the whole DB is blocked if this process is holding important locks. +> > +> > Looks like this issue was discussed in the following thread a few +> > month ago, but didn't seem to have a solution mention. I would liek +> > to know if there is a patch for this already? +> > +> > http://archives.postgresql.org/pgsql-performance/2006- +> > 03/msg00129.php +> > +> +> There have been some fairly extensive changes in the semaphore code for +> 8.2. Any chance you can try the cvs snapshot version and see if the +> problem exists there as well? +> +> //Magnus +> + +------=_Part_118540_16090014.1157437884576 +Content-Type: text/html; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +Hi Magnus,

Sure, I could try that out. Is there a place to download a 8.2 image to bypass setting up the tool chain?

-Wei


On 9/4/06, Magnus Hagander + <mha@sollentuna.net> wrote:
> Hi, +
>
> We are seeing hanging queries on Windows 2003 Server SP1 with dual
> CPU, looks like one of the process is blocked. In a lot of cases,
> the whole DB is blocked if this process is holding important locks. +
>
> Looks like this issue was discussed in the following thread a few
> month ago, but didn't seem to have a solution mention. I would liek
> to know if there is a patch for this already?
>
+> http://archives.postgresql.org/pgsql-performance/2006-
> 03/msg00129.php
>

There have been some fairly extensive changes in the semaphore code for +
8.2. Any chance you can try the cvs snapshot version and see if the
problem exists there as well?

//Magnus

+ +------=_Part_118540_16090014.1157437884576-- + +From pgsql-performance-owner@postgresql.org Tue Sep 5 10:32:16 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id C13CB9FB220 + for ; + Tue, 5 Sep 2006 10:32:13 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 70432-02 for + ; + Tue, 5 Sep 2006 13:32:03 +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from nz-out-0102.google.com (nz-out-0102.google.com + [64.233.162.195]) + by postgresql.org (Postfix) with ESMTP id CAC819FB20B + for ; + Tue, 5 Sep 2006 10:32:00 -0300 (ADT) +Received: by nz-out-0102.google.com with SMTP id 14so1021510nzn + for ; + Tue, 05 Sep 2006 06:31:59 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; + b=mQzgkK/F35jomoQdCt7j+62RTcca1VrZjdSb4cL9Xb/j1eC/XC1FgG1WJ1xufGZsfyFZjwNT75l7cSDepodBPDQ/5c4ibVPT/fBU0/4iNcvXOPevXkb6s13O8p3Vu90dHNRRER26YdedoUQCLPJQQrI7HRaSggMObg1MGZfUrZk= +Received: by 10.65.250.11 with SMTP id c11mr4613697qbs; + Tue, 05 Sep 2006 06:31:59 -0700 (PDT) +Received: by 10.65.137.12 with HTTP; Tue, 5 Sep 2006 06:31:59 -0700 (PDT) +Message-ID: +Date: Tue, 5 Sep 2006 09:31:59 -0400 +From: "Merlin Moncure" +To: "Joshua D. Drake" +Subject: Re: increasing shared buffers: how much should be removed +Cc: "Dave Cramer" , "Guillaume Cottenceau" , + pgsql-performance@postgresql.org +In-Reply-To: <44F8CF32.9040606@commandprompt.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline +References: <87veo7a5dn.fsf@meuh.mnc.lan> + + + <44F8CF32.9040606@commandprompt.com> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 + tests=DNS_FROM_RFC_ABUSE, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/29 +X-Sequence-Number: 20715 + +On 9/1/06, Joshua D. Drake wrote: +> >> +> >> I think 'shared buffers' is one of the most overrated settings from a +> >> performance standpoint. however you must ensure there is enough for +> >> things the server does besides caching. It used to be a bigger deal +> >> than it is in modern versionf of postgresql modern operating systems. +> +> Previous to 8.1 I would agree with you, but as of 8.1 it is probably the +> most underrated. + +really? what are the relative advantages of raising shared buffers? I +was thinking maybe there might be less context switches in high load +environments...I'm really curious what you have to say here. + +merlin + +From pgsql-performance-owner@postgresql.org Tue Sep 5 15:13:12 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id B45DD9FB365 + for ; + Tue, 5 Sep 2006 15:13:11 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 76288-04 for + ; + Tue, 5 Sep 2006 18:13:02 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 62B799FB361 + for ; + Tue, 5 Sep 2006 15:12:55 -0300 (ADT) +Received: (qmail 27035 invoked from network); 5 Sep 2006 18:12:54 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 5 Sep 2006 18:12:54 -0000 +In-Reply-To: +References: <87veo7a5dn.fsf@meuh.mnc.lan> + + + <44F8CF32.9040606@commandprompt.com> + +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: +Cc: "Joshua D. Drake" , + "Guillaume Cottenceau" , pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: increasing shared buffers: how much should be removed +Date: Tue, 5 Sep 2006 14:12:46 -0400 +To: Merlin Moncure +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/30 +X-Sequence-Number: 20716 + + +On 5-Sep-06, at 9:31 AM, Merlin Moncure wrote: + +> On 9/1/06, Joshua D. Drake wrote: +>> >> +>> >> I think 'shared buffers' is one of the most overrated settings +>> from a +>> >> performance standpoint. however you must ensure there is +>> enough for +>> >> things the server does besides caching. It used to be a bigger +>> deal +>> >> than it is in modern versionf of postgresql modern operating +>> systems. +>> +>> Previous to 8.1 I would agree with you, but as of 8.1 it is +>> probably the +>> most underrated. +> +> really? what are the relative advantages of raising shared buffers? I +> was thinking maybe there might be less context switches in high load +> environments...I'm really curious what you have to say here. + +Have you tried it ? The results are quite dramatic. + +So if shared buffers aren't the first tool you reach for, what is ? +> +> merlin +> +> ---------------------------(end of +> broadcast)--------------------------- +> TIP 2: Don't 'kill -9' the postmaster +> + + +From pgsql-performance-owner@postgresql.org Wed Sep 6 09:50:36 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 657B59FB2BF + for ; + Wed, 6 Sep 2006 09:50:35 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 32628-07 for + ; + Wed, 6 Sep 2006 12:50:04 +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from nf-out-0910.google.com (nf-out-0910.google.com + [64.233.182.187]) + by postgresql.org (Postfix) with ESMTP id B738A9FB375 + for ; + Wed, 6 Sep 2006 09:45:20 -0300 (ADT) +Received: by nf-out-0910.google.com with SMTP id p77so206877nfc + for ; + Wed, 06 Sep 2006 05:45:18 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; + b=evmFvjDAfKnwAYTjwzkqDMT5vexi9QjpNOGziQZdYL/bLf75yuKDQn/7blJUiDlLdmHmZZVQLztI+Mw6d4PlmWJkiDOlVVPfRbuIFjPP8aX40tBPQw+66aflEHMD/IgmrcaBCiTxYGmwaWePdt1dhbQ83Cn/ydpAWzIRXRd7Pvc= +Received: by 10.49.26.18 with SMTP id d18mr828744nfj; + Wed, 06 Sep 2006 05:45:17 -0700 (PDT) +Received: by 10.49.87.3 with HTTP; Wed, 6 Sep 2006 05:45:16 -0700 (PDT) +Message-ID: <9f394b1c0609060545v3962f369g22180ca5f4975092@mail.gmail.com> +Date: Wed, 6 Sep 2006 09:45:16 -0300 +From: "Marcus Vinicius" +To: pgsql-performance@postgresql.org +Subject: Lists (In) performance +MIME-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/31 +X-Sequence-Number: 20717 + +Hi, + +Is the use of lists "Where field IN ('A',...'Z')" faster than using +multiple conditions like "Where field = 'A' OR .... field = 'Z'" ? In +every situation ? Depends on what ? + +Note: (I guess im mistaken, but i remeber seeing that at the pgsql +manual somewhere) + +Thanks + +Marcus + +From pgsql-patches-owner@postgresql.org Thu Sep 7 07:31:42 2006 +X-Original-To: pgsql-patches-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 2A5C09FB284 + for ; + Thu, 7 Sep 2006 07:31:39 -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 39108-10 for + ; + Thu, 7 Sep 2006 07:31:35 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.229]) + by postgresql.org (Postfix) with ESMTP id C33DE9FB262 + for ; + Thu, 7 Sep 2006 07:31:35 -0300 (ADT) +Received: by wx-out-0506.google.com with SMTP id t13so194592wxc + for ; + Thu, 07 Sep 2006 03:31:34 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:mime-version:content-type; + b=jhOedV3BzefctszUjXwJKfqTK2whVTREyaQh8gyWZdkMgo6oZaHZIWnHDI1MXC51z2Xs+g0BKWX1LiVB7FOL+tQYO71TmsAIY4kAHljEt4Rk3e8piepVfwRUX1afaTounXosZwT8Op+x8aFWZa/N3wqUH2bgZx+OQj3SC8SbIeo= +Received: by 10.90.25.3 with SMTP id 3mr80299agy; + Thu, 07 Sep 2006 03:31:34 -0700 (PDT) +Received: by 10.90.93.18 with HTTP; Thu, 7 Sep 2006 03:31:34 -0700 (PDT) +Message-ID: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> +Date: Thu, 7 Sep 2006 16:01:34 +0530 +From: "Nimesh Satam" +To: pgsql-hackers@postgresql.org, pgsql-bugs@postgresql.org, + pgsql-patches@postgresql.org, pgsql-performance@postgresql.org +Subject: Template0 age is increasing speedily. +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_Part_144483_16459863.1157625094405" +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.2 tagged_above=0 required=5 + tests=DNS_FROM_RFC_ABUSE, HTML_MESSAGE, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/139 +X-Sequence-Number: 21152 + +------=_Part_144483_16459863.1157625094405 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +Hi!.. + +I noticed that the age of template0 is increasing very rapidly..Can you +please let me know how we can control this ....and what causes such +problems. + +We also noticed that the database slow downs heavily at a particular +time..Can you suggest any tools which will help in diagnosing the root cause +behiond the data load. + + + +Regards, +Nimesh. + +------=_Part_144483_16459863.1157625094405 +Content-Type: text/html; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +
Hi!..
+
 
+
I noticed that the age of  template0 is increasing very rapidly..Can you please let me know how we can control this ....and what causes such problems.
+
 
+
We also noticed that the database slow downs heavily at a particular time..Can you suggest any tools which will help in diagnosing the root cause behiond the data load.
+
 
+
 
+
 
+
Regards,
+
Nimesh.
+ +------=_Part_144483_16459863.1157625094405-- + +From pgsql-performance-owner@postgresql.org Thu Sep 7 07:40:37 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id ECB039FB29B + for ; + Thu, 7 Sep 2006 07:40:36 -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 42948-07 for + ; + Thu, 7 Sep 2006 07:40:28 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from my.endian.it (unknown [62.146.87.34]) + by postgresql.org (Postfix) with ESMTP id 25C0D9FB299 + for ; + Thu, 7 Sep 2006 07:40:27 -0300 (ADT) +Received: from ultra.home.lan (host170-230.pool875.interbusiness.it + [87.5.230.170]) (authenticated (0 bits)) + by my.endian.it (8.11.6/8.11.6) with ESMTP id k87AnbT08287; + Thu, 7 Sep 2006 12:49:37 +0200 +Subject: Re: [PATCHES] Template0 age is increasing speedily. +From: Chris Mair +To: Nimesh Satam +Cc: pgsql-performance@postgresql.org +In-Reply-To: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> +References: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> +Content-Type: text/plain +Date: Thu, 07 Sep 2006 12:40:25 +0200 +Message-Id: <1157625625.28654.4.camel@ultra.home.lan> +Mime-Version: 1.0 +X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.168 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/33 +X-Sequence-Number: 20719 + +On Thu, 2006-09-07 at 16:01 +0530, Nimesh Satam wrote: + +> I noticed that the age of template0 is increasing very rapidly..Can +> you please let me know how we can control this ....and what causes +> such problems. +> +> We also noticed that the database slow downs heavily at a particular +> time..Can you suggest any tools which will help in diagnosing the root +> cause behiond the data load. + + +Hi, + +first of all: there is no need to cross post on 4 lists. +If you have a performance problem, post on pgsql-performance. + +Second, please tell us which version of PostgreSQL on +which operating system you're using. Diagnosing your +problem might depend on which OS you use... + +Finally, explain what you mean by "the age of template0 is +increasing very rapidly", you mean "the size is increasing"? + +Bye, +Chris. + + + +-- + +Chris Mair +http://www.1006.org + + +From pgsql-performance-owner@postgresql.org Thu Sep 7 07:49:12 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 3D26D9FB28D + for ; + Thu, 7 Sep 2006 07:49:12 -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 45268-03 for + ; + Thu, 7 Sep 2006 07:49:02 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) + by postgresql.org (Postfix) with ESMTP id D28E09FB2A2 + for ; + Thu, 7 Sep 2006 07:49:02 -0300 (ADT) +Received: by wx-out-0506.google.com with SMTP id t13so199852wxc + for ; + Thu, 07 Sep 2006 03:49:01 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; + b=F8A+fnyr2aWhBB+ofq+0LLo2jCFYvTPodMswHkv9ChyHIkhdpFyQ9kuDMwGhx84QWOd5igib6U/GQ+P98wGsbBTe0Y23RUwsWh6C1q7mdrSGIilP5t/09D63BFvZVLSkr53J8OryPTu16ahIt94nuV7MLGaO8ltPApi2zC56Zg0= +Received: by 10.90.72.10 with SMTP id u10mr87447aga; + Thu, 07 Sep 2006 03:49:01 -0700 (PDT) +Received: by 10.90.93.18 with HTTP; Thu, 7 Sep 2006 03:49:01 -0700 (PDT) +Message-ID: <965aa3ed0609070349t10565a86i9100cc9ec1b8b043@mail.gmail.com> +Date: Thu, 7 Sep 2006 16:19:01 +0530 +From: "Nimesh Satam" +To: "Chris Mair" +Subject: Re: [PATCHES] Template0 age is increasing speedily. +Cc: pgsql-performance@postgresql.org +In-Reply-To: <1157625625.28654.4.camel@ultra.home.lan> +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_Part_144643_20270195.1157626141533" +References: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> + <1157625625.28654.4.camel@ultra.home.lan> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.448 tagged_above=0 required=5 tests=AWL, + DNS_FROM_RFC_ABUSE, HTML_40_50, HTML_MESSAGE, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/34 +X-Sequence-Number: 20720 + +------=_Part_144643_20270195.1157626141533 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +Hi, + +Postgres Version used is 8.1.3 +OS: Linux + + +'SELECT datname, age(datfrozenxid) FROM pg_database' + +postgres | 1575 +xyz | 1073743934 +template1 | 1632 +template0 | 61540256 + +This is the command which I tried and got the above output, and the number +is increasing pretty fast for template0. + +Please let me know if this a problem. + + + +Regards, +Nimesh. + + +On 9/7/06, Chris Mair wrote: +> +> On Thu, 2006-09-07 at 16:01 +0530, Nimesh Satam wrote: +> +> > I noticed that the age of template0 is increasing very rapidly..Can +> > you please let me know how we can control this ....and what causes +> > such problems. +> > +> > We also noticed that the database slow downs heavily at a particular +> > time..Can you suggest any tools which will help in diagnosing the root +> > cause behiond the data load. +> +> +> Hi, +> +> first of all: there is no need to cross post on 4 lists. +> If you have a performance problem, post on pgsql-performance. +> +> Second, please tell us which version of PostgreSQL on +> which operating system you're using. Diagnosing your +> problem might depend on which OS you use... +> +> Finally, explain what you mean by "the age of template0 is +> increasing very rapidly", you mean "the size is increasing"? +> +> Bye, +> Chris. +> +> +> +> -- +> +> Chris Mair +> http://www.1006.org +> +> + +------=_Part_144643_20270195.1157626141533 +Content-Type: text/html; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +

Hi,
+
 
+
Postgres Version used is 8.1.3
+
OS: Linux
+
 
+
 
+
'SELECT datname, age(datfrozenxid) FROM pg_database'
+
 
+
postgres       |       1575
xyz               | 1073743934
template1      |       1632
template0      |   61540256
 
+
This is the command which I tried and got the above output, and the number is increasing pretty fast for template0.
+
 
+
Please let me know if this a problem.
+
 
+
 
+
 
+
Regards,
+
Nimesh.
+

 
+
On 9/7/06, Chris Mair <chrisnospam@1006.org> wrote: +
On Thu, 2006-09-07 at 16:01 +0530, Nimesh Satam wrote:

> I noticed that the age of  template0 is increasing very rapidly..Can +
> you please let me know how we can control this ....and what causes
> such problems.
>
> We also noticed that the database slow downs heavily at a particular
> time..Can you suggest any tools which will help in diagnosing the root +
> cause behiond the data load.


Hi,

first of all: there is no need to cross post on 4 lists.
If you have a performance problem, post on pgsql-performance.

Second, please tell us which version of PostgreSQL on +
which operating system you're using. Diagnosing your
problem might depend on which OS you use...

Finally, explain what you mean by "the age of template0 is
increasing very rapidly", you mean "the size is increasing"? +

Bye,
Chris.



--

Chris Mair
http://www.1006.org


+ +------=_Part_144643_20270195.1157626141533-- + +From pgsql-performance-owner@postgresql.org Thu Sep 7 09:50:10 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 641069FB2CE + for ; + Thu, 7 Sep 2006 09:50:09 -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 54354-02 for + ; + Thu, 7 Sep 2006 09:50:02 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mx00.pub.collaborativefusion.com + (mx00.pub.collaborativefusion.com [206.210.89.199]) + by postgresql.org (Postfix) with ESMTP id 930889FB2DA + for ; + Thu, 7 Sep 2006 09:48:38 -0300 (ADT) +Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com + [206.210.89.201]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) + by wingspan with esmtp; Thu, 07 Sep 2006 08:48:37 -0400 + id 00056421.45001525.0000BD91 +Received: from Internal Mail-Server (206.210.89.202) by mx01 (envelope-from + wmoran@collaborativefusion.com) + with AES256-SHA encrypted SMTP; 7 Sep 2006 08:46:33 -0400 +Date: Thu, 7 Sep 2006 08:48:35 -0400 +From: Bill Moran +To: "Nimesh Satam" +Cc: pgsql-performance@postgresql.org +Subject: Re: [PATCHES] Template0 age is increasing speedily. +Message-Id: <20060907084835.20127ac0.wmoran@collaborativefusion.com> +In-Reply-To: <965aa3ed0609070349t10565a86i9100cc9ec1b8b043@mail.gmail.com> +References: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> + <1157625625.28654.4.camel@ultra.home.lan> + <965aa3ed0609070349t10565a86i9100cc9ec1b8b043@mail.gmail.com> +Organization: Collaborative Fusion +X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.20; i386-portbld-freebsd6.1) +Mime-Version: 1.0 +Content-Type: text/plain; charset=US-ASCII +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.041 tagged_above=0 required=5 tests=AWL, + UNPARSEABLE_RELAY +X-Spam-Level: +X-Archive-Number: 200609/35 +X-Sequence-Number: 20721 + +In response to "Nimesh Satam" : + +> Hi, +> +> Postgres Version used is 8.1.3 +> OS: Linux +> +> +> 'SELECT datname, age(datfrozenxid) FROM pg_database' +> +> postgres | 1575 +> xyz | 1073743934 +> template1 | 1632 +> template0 | 61540256 +> +> This is the command which I tried and got the above output, and the number +> is increasing pretty fast for template0. +> +> Please let me know if this a problem. + +Short answer: no, this is not a problem. + +Long answer: +http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html + +-- +Bill Moran +Collaborative Fusion Inc. + +**************************************************************** +IMPORTANT: This message contains confidential information and is +intended only for the individual named. If the reader of this +message is not an intended recipient (or the individual +responsible for the delivery of this message to an intended +recipient), please be advised that any re-use, dissemination, +distribution or copying of this message is prohibited. Please +notify the sender immediately by e-mail if you have received +this e-mail by mistake and delete this e-mail from your system. +E-mail transmission cannot be guaranteed to be secure or +error-free as information could be intercepted, corrupted, lost, +destroyed, arrive late or incomplete, or contain viruses. The +sender therefore does not accept liability for any errors or +omissions in the contents of this message, which arise as a +result of e-mail transmission. +**************************************************************** + +From pgsql-performance-owner@postgresql.org Thu Sep 7 09:55:21 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id B0C0F9FB258 + for ; + Thu, 7 Sep 2006 09:55:20 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 73585-05-3 + for ; + Thu, 7 Sep 2006 12:55:10 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from globalrelay.com (mail1.globalrelay.com [216.18.71.77]) + by postgresql.org (Postfix) with ESMTP id D71469FA375 + for ; + Thu, 7 Sep 2006 09:55:08 -0300 (ADT) +X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway +X-GR-Acctd: YES +Received: from [67.90.96.2] (HELO DaveEMachine) + by globalrelay.com (CommuniGate Pro SMTP 4.2.3) + with ESMTP id 103722323; Thu, 07 Sep 2006 05:55:03 -0700 +From: "Dave Dutcher" +To: "'Nimesh Satam'" +Cc: +Subject: Re: [PATCHES] Template0 age is increasing speedily. +Date: Thu, 7 Sep 2006 07:55:01 -0500 +Message-ID: <012601c6d27c$d52be840$8300a8c0@tridecap.com> +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_NextPart_000_0127_01C6D252.EC55E040" +X-Priority: 3 (Normal) +X-MSMail-Priority: Normal +X-Mailer: Microsoft Outlook, Build 10.0.6626 +In-Reply-To: <965aa3ed0609070349t10565a86i9100cc9ec1b8b043@mail.gmail.com> +X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 +Importance: Normal +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=HTML_50_60, + HTML_MESSAGE +X-Spam-Level: +X-Archive-Number: 200609/36 +X-Sequence-Number: 20722 + +This is a multi-part message in MIME format. + +------=_NextPart_000_0127_01C6D252.EC55E040 +Content-Type: text/plain; + charset="US-ASCII" +Content-Transfer-Encoding: quoted-printable + +I would expect that the age of Template0 is increasing at the same rate = +as +every other database in your cluster. Transaction IDs are global across = +all +databases in the cluster, so as I understand it, executing a transaction = +in +any database will increase the age of all databases by 1. +=20 + +-----Original Message----- +From: pgsql-performance-owner@postgresql.org +[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Nimesh = +Satam +Sent: Thursday, September 07, 2006 5:49 AM +To: Chris Mair +Cc: pgsql-performance@postgresql.org +Subject: Re: [PERFORM] [PATCHES] Template0 age is increasing speedily. + + + +Hi, +=20 +Postgres Version used is 8.1.3 +OS: Linux +=20 +=20 +'SELECT datname, age(datfrozenxid) FROM pg_database' +=20 +postgres | 1575 +xyz | 1073743934 +template1 | 1632 +template0 | 61540256 +=20 +This is the command which I tried and got the above output, and the = +number +is increasing pretty fast for template0. +=20 +Please let me know if this a problem. +=20 +=20 +=20 +Regards, +Nimesh. + +=20 +On 9/7/06, Chris Mair wrote:=20 + +On Thu, 2006-09-07 at 16:01 +0530, Nimesh Satam wrote: + +> I noticed that the age of template0 is increasing very rapidly..Can=20 +> you please let me know how we can control this ....and what causes +> such problems. +> +> We also noticed that the database slow downs heavily at a particular +> time..Can you suggest any tools which will help in diagnosing the root = + +> cause behiond the data load. + + +Hi, + +first of all: there is no need to cross post on 4 lists. +If you have a performance problem, post on pgsql-performance. + +Second, please tell us which version of PostgreSQL on=20 +which operating system you're using. Diagnosing your +problem might depend on which OS you use... + +Finally, explain what you mean by "the age of template0 is +increasing very rapidly", you mean "the size is increasing"?=20 + +Bye, +Chris. + + + +-- + +Chris Mair +http://www.1006.org + + + + + +------=_NextPart_000_0127_01C6D252.EC55E040 +Content-Type: text/html; + charset="US-ASCII" +Content-Transfer-Encoding: quoted-printable + + + + +Message + + + +
I=20 +would expect that the age of Template0 is increasing at the same rate as = +every=20 +other database in your cluster.  Transaction IDs are global across = +all=20 +databases in the cluster, so as I understand it, executing a transaction = +in any=20 +database will increase the age of all databases by = +1.
+
 
+ +
+
-----Original Message-----
From:=20 + pgsql-performance-owner@postgresql.org=20 + [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of = +Nimesh=20 + Satam
Sent: Thursday, September 07, 2006 5:49 = +AM
To: Chris=20 + Mair
Cc: pgsql-performance@postgresql.org
Subject: = +Re:=20 + [PERFORM] [PATCHES] Template0 age is increasing = +speedily.

+

Hi,
+
 
+
Postgres Version used is 8.1.3
+
OS: Linux
+
 
+
 
+
'SELECT datname, age(datfrozenxid) FROM pg_database'
+
 
+
postgres      =20 + |      =20 + = +1575
xyz          &n= +bsp;   =20 + | 1073743934
template1     =20 + |      =20 + 1632
template0      |  =20 + 61540256
 
+
This is the command which I tried and got the above output, and = +the=20 + number is increasing pretty fast for template0.
+
 
+
Please let me know if this a problem.
+
 
+
 
+
 
+
Regards,
+
Nimesh.
+

 
+
On 9/7/06, Chris=20 + Mair <chrisnospam@1006.org> = +wrote:=20 +
On=20 + Thu, 2006-09-07 at 16:01 +0530, Nimesh Satam wrote:

> I = +noticed=20 + that the age of  template0 is increasing very rapidly..Can = + +
> you please let me know how we can control this ....and what = + + causes
> such problems.
>
> We also noticed that = +the=20 + database slow downs heavily at a particular
> time..Can you = +suggest=20 + any tools which will help in diagnosing the root
> cause = +behiond the=20 + data load.


Hi,

first of all: there is no need to = +cross=20 + post on 4 lists.
If you have a performance problem, post on=20 + pgsql-performance.

Second, please tell us which version of = +PostgreSQL=20 + on
which operating system you're using. Diagnosing = +your
problem might=20 + depend on which OS you use...

Finally, explain what you mean = +by "the=20 + age of template0 is
increasing very rapidly", you mean "the size = +is=20 + increasing"?

Bye,
Chris.



--

Chris=20 + Mair
http://www.1006.org

= +

+ +------=_NextPart_000_0127_01C6D252.EC55E040-- + + +From pgsql-bugs-owner@postgresql.org Thu Sep 7 12:39:34 2006 +X-Original-To: pgsql-bugs-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 85F2F9FB2BF + for ; + Thu, 7 Sep 2006 10:04:33 -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 56220-01 for ; + Thu, 7 Sep 2006 10:04:27 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from nz-out-0102.google.com (nz-out-0102.google.com + [64.233.162.194]) + by postgresql.org (Postfix) with ESMTP id 546529FB2BD + for ; Thu, 7 Sep 2006 10:04:26 -0300 (ADT) +Received: by nz-out-0102.google.com with SMTP id 14so87096nzn + for ; Thu, 07 Sep 2006 06:04:24 -0700 (PDT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; + h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; + b=JA1hgB53hE/mKrSzTErK550q+T0PVC4dKUn2LkVBGb2yh6SCCQXaVMqpM76ug2lfz0qtKPvDc8upAlyT2G2AR3ec0/0tcxb1xQu9egX4YBez8cnk0lSqyiHZkTb1G1R83bowXg6b6pMW6bArZ/Jt9GYPFNb2jJkMyst9dAphj4w= +Received: by 10.65.126.4 with SMTP id d4mr565598qbn; + Thu, 07 Sep 2006 06:04:24 -0700 (PDT) +Received: by 10.65.137.12 with HTTP; Thu, 7 Sep 2006 06:04:24 -0700 (PDT) +Message-ID: +Date: Thu, 7 Sep 2006 09:04:24 -0400 +From: "Merlin Moncure" +To: "Nimesh Satam" +Subject: Re: [HACKERS] Template0 age is increasing speedily. +Cc: pgsql-hackers@postgresql.org, pgsql-bugs@postgresql.org, + pgsql-patches@postgresql.org, pgsql-performance@postgresql.org +In-Reply-To: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +Content-Disposition: inline +References: <965aa3ed0609070331y5749226eg91de0b376e343c75@mail.gmail.com> +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.297 tagged_above=0 required=5 tests=AWL, + DNS_FROM_RFC_ABUSE, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/35 +X-Sequence-Number: 15711 + +On 9/7/06, Nimesh Satam wrote: +> We also noticed that the database slow downs heavily at a particular +> time..Can you suggest any tools which will help in diagnosing the root cause +> behiond the data load. + +possible checkpoint? poorly formulated query? it could be any number +of things. use standard tools to diagnose the problem, including: + +unix tools: top, vmstat, etc +postgresql query logging, including min_statement_duration +explain analyze + +From pgsql-performance-owner@postgresql.org Thu Sep 7 14:55:56 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 3D3749FB4E8 + for ; + Thu, 7 Sep 2006 14:55:55 -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 81671-01-4 + for ; + Thu, 7 Sep 2006 14:55:42 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) + by postgresql.org (Postfix) with ESMTP id 4328F9FB7A6 + for ; + Thu, 7 Sep 2006 13:56:09 -0300 (ADT) +Received: from [209.162.219.253] (helo=dogma.v10.wvs) + by servata.com with esmtpa (Exim 4.50) + id 1GLNAa-0003s8-CR; Thu, 07 Sep 2006 09:56:04 -0700 +Subject: Re: 64bit vs 32bit build on amd64 +From: Jeff Davis +To: Roman Krylov +Cc: pgsql-performance@postgresql.org +In-Reply-To: <44FC8FB4.4030706@mail.ru> +References: <44FC8FB4.4030706@mail.ru> +Content-Type: text/plain +Date: Thu, 07 Sep 2006 09:56:01 -0700 +Message-Id: <1157648161.20589.154.camel@dogma.v10.wvs> +Mime-Version: 1.0 +X-Mailer: Evolution 2.0.4 (2.0.4-7) +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.251 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO, SPF_HELO_PASS +X-Spam-Level: +X-Archive-Number: 200609/38 +X-Sequence-Number: 20724 + +On Tue, 2006-09-05 at 00:42 +0400, Roman Krylov wrote: +> Hi. +> My config: +> gentoo linux "2005.1" on amd64x2 in 64-bit mode, +> kernel 2.6.16.12 +> glibc 3.3.5(NPTL), +> gcc 3.4.3. +> I had not used portage for building. +> I built two versions of postgres from sources: +> postgresql-8.1.4 native(64bit) +> and 32-bit with CFLAGS=... -m32, and "LD = +> /usr/x86_64-pc-linux-gnu/bin/ld -melf_i386" in src/Makefile.global. +> 32-bit build runs much faster than 64 apparently. +> What benchmark utility should I run to provide more concrete info (numbers)? +> What could be the reason of that difference in performance? +> + +I am also interested in 32-bit versus 64-bit performance. If I only have +4GB of RAM, does it make sense to compile postgresql as a 64-bit +executable? I assume there's no reason for PostgreSQL's shared buffers, +etc., to add up to more than 2GB on a system with 4GB of RAM. + +Is there a general consensus on the matter, or is it highly application- +dependent? I am not doing any huge amount of 64-bit arithmetic. + +I am using Woodcrest, not Opteron. + +Regards, + Jeff Davis + + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 02:51:18 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id B33FB9FB2D8 + for ; + Fri, 8 Sep 2006 02:51:17 -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 46547-10 for + ; + Fri, 8 Sep 2006 02:51:04 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from olive.qinip.net (olive.qinip.net [62.100.30.40]) + by postgresql.org (Postfix) with ESMTP id 0BBB49FA4CB + for ; + Fri, 8 Sep 2006 02:51:05 -0300 (ADT) +Received: from [127.0.0.1] (h8441139206.dsl.speedlinq.nl [84.41.139.206]) + by olive.qinip.net (Postfix) with ESMTP id D3BE718114 + for ; + Fri, 8 Sep 2006 07:51:00 +0200 (MEST) +Message-ID: <450104C8.2070709@tweakers.net> +Date: Fri, 08 Sep 2006 07:51:04 +0200 +From: Arjen van der Meijden +User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) +MIME-Version: 1.0 +To: pgsql-performance@postgresql.org +Subject: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with postgresql and + some SAS raid-figures +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Antivirus: avast! (VPS 0636-2, 07-09-2006), Outbound message +X-Antivirus-Status: Clean +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.139 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/39 +X-Sequence-Number: 20725 + +Hi, + +We've been running our "webapp database"-benchmark again on mysql and +postgresql. This time using a Fujitsu-Siemens RX300 S3 machine equipped +with a 2.66Ghz Woodcrest (5150) and a 3.73Ghz Dempsey (5080). And +compared those results to our earlier undertaken Opteron benchmarks on +2.4GHz' Socket F- and 940-versions (2216, 280). + +You can see the english translation here: +http://tweakers.net/reviews/646 + +The Woodcrest is quite a bit faster than the Opterons. Actually... With +Hyperthreading *enabled* the older Dempsey-processor is also faster than +the Opterons with PostgreSQL. But then again, it is the top-model +Dempsey and not a top-model Opteron so that isn't a clear win. +Of course its clear that even a top-Opteron wouldn't beat the Dempsey's +as easily as it would have beaten the older Xeon's before that. + +Again PostgreSQL shows very good scalability, so good even +HyperThreading adds extra performance to it with 4 cores enabled... +while MySQL in every version we tested (5.1.9 is not displayed, but +showed similar performance) was slower with HT enabled. + +Further more we received our ordered Dell MD1000 SAS-enclosure which has +15 SAS Fujitsu MAX3036RC disks and that unit is controlled using a Dell +PERC 5/e. +We've done some benchmarks (unfortunately everything is in Dutch for this). + +We tested varying amounts of disks in RAID10 (a set of 4,5,6 and 7 +2-disk-mirrors striped), RAID50 and RAID5. The interfaces to display the +results are in a google-stylee beta-state, but here is a list of all +benchmarks done: +http://tweakers.net/benchdb/search?query=md1000&ColcomboID=5 + +Hover over the left titles to see how many disks and in what raid-level + was done. Here is a comparison of 14 disk RAID5/50/10's: +http://tweakers.net/benchdb/testcombo/wide/?TestcomboIDs%5B1156%5D=1&TestcomboIDs%5B1178%5D=1&TestcomboIDs%5B1176%5D=1&DB=Nieuws&Query=Keyword + +For raid5 we have some graphs: +http://tweakers.net/benchdb/testcombo/1156 +Scroll down to see how adding disks improves performance on it. The +Areca 1280 with WD Raptor's is a very good alternative (or even better) +as you can see for most benchmarks, but is beaten as soon as the +relative weight of random-IO increases (I/O-meter fileserver and +database benchmarks), the processor on the 1280 is faster than the one +on the Dell-controller so its faster in sequential IO. +These benchmarks were not done using postgresql, so you shouldn't read +them as absolute for all your situations ;-) But you can get a good +impression I think. + +Best regards, + +Arjen van der Meijden +Tweakers.net + +From pgsql-performance-owner@postgresql.org Fri Sep 8 03:17:37 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id F1FC49FB2D8 + for ; + Fri, 8 Sep 2006 03:17:31 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 31233-04 for + ; + Fri, 8 Sep 2006 06:17:21 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mi8.com (d01gw02.mi8.com [63.240.6.46]) + by postgresql.org (Postfix) with ESMTP id 814CF9FB21A + for ; + Fri, 8 Sep 2006 03:17:17 -0300 (ADT) +Received: from 172.16.1.148 by mail.mi8.com with ESMTP (- Welcome to Mi8 + Corporation www.Mi8.com (D2)); Fri, 08 Sep 2006 02:17:07 -0400 +X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 +Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.160]) by + D01HOST02.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 8 Sep + 2006 02:17:07 -0400 +Received: from 69.181.100.71 ([69.181.100.71]) by MI8NYCMAIL06.Mi8.com ( + [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( + [172.16.1.106]) with Microsoft Exchange Server HTTP-DAV ; Fri, 8 Sep + 2006 06:17:06 +0000 +User-Agent: Microsoft-Entourage/11.2.5.060620 +Date: Thu, 07 Sep 2006 23:17:05 -0700 +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 +From: "Luke Lonergan" +To: "Arjen van der Meijden" , + pgsql-performance@postgresql.org +Message-ID: +Thread-Topic: [PERFORM] Xeon Woodcrest/Dempsey vs Opteron Socket F/940 + with postgresql and some SAS raid-figures +Thread-Index: AcbTDme7pgVHLj8BEduyKwAWy4o9DA== +In-Reply-To: <450104C8.2070709@tweakers.net> +MIME-Version: 1.0 +X-OriginalArrivalTime: 08 Sep 2006 06:17:07.0398 (UTC) + FILETIME=[6929AE60:01C6D30E] +X-WSS-ID: 691FD5692V01676039-01-01 +Content-Type: text/plain; + charset=us-ascii +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.635 tagged_above=0 required=5 + tests=FORGED_RCVD_HELO, RCVD_NUMERIC_HELO +X-Spam-Level: * +X-Archive-Number: 200609/40 +X-Sequence-Number: 20726 + +Very nice! + +The 3Ware cards have fallen far behind Areca it seems. They look close in +Raid 10 performance, but with RAID5 they get crushed. + +I'm about to purchase 20 machines for the lab and I think this article +pushes me toward Woodcrest, though I think it's a short term decision with +quad core AMD socket F coming later this year. Right now it seems that the +Intel advantage is about 30%-40%. + +- Luke + + +On 9/7/06 10:51 PM, "Arjen van der Meijden" wrote: + +> Hi, +> +> We've been running our "webapp database"-benchmark again on mysql and +> postgresql. This time using a Fujitsu-Siemens RX300 S3 machine equipped +> with a 2.66Ghz Woodcrest (5150) and a 3.73Ghz Dempsey (5080). And +> compared those results to our earlier undertaken Opteron benchmarks on +> 2.4GHz' Socket F- and 940-versions (2216, 280). +> +> You can see the english translation here: +> http://tweakers.net/reviews/646 +> +> The Woodcrest is quite a bit faster than the Opterons. Actually... With +> Hyperthreading *enabled* the older Dempsey-processor is also faster than +> the Opterons with PostgreSQL. But then again, it is the top-model +> Dempsey and not a top-model Opteron so that isn't a clear win. +> Of course its clear that even a top-Opteron wouldn't beat the Dempsey's +> as easily as it would have beaten the older Xeon's before that. +> +> Again PostgreSQL shows very good scalability, so good even +> HyperThreading adds extra performance to it with 4 cores enabled... +> while MySQL in every version we tested (5.1.9 is not displayed, but +> showed similar performance) was slower with HT enabled. +> +> Further more we received our ordered Dell MD1000 SAS-enclosure which has +> 15 SAS Fujitsu MAX3036RC disks and that unit is controlled using a Dell +> PERC 5/e. +> We've done some benchmarks (unfortunately everything is in Dutch for this). +> +> We tested varying amounts of disks in RAID10 (a set of 4,5,6 and 7 +> 2-disk-mirrors striped), RAID50 and RAID5. The interfaces to display the +> results are in a google-stylee beta-state, but here is a list of all +> benchmarks done: +> http://tweakers.net/benchdb/search?query=md1000&ColcomboID=5 +> +> Hover over the left titles to see how many disks and in what raid-level +> was done. Here is a comparison of 14 disk RAID5/50/10's: +> http://tweakers.net/benchdb/testcombo/wide/?TestcomboIDs%5B1156%5D=1&Testcombo +> IDs%5B1178%5D=1&TestcomboIDs%5B1176%5D=1&DB=Nieuws&Query=Keyword +> +> For raid5 we have some graphs: +> http://tweakers.net/benchdb/testcombo/1156 +> Scroll down to see how adding disks improves performance on it. The +> Areca 1280 with WD Raptor's is a very good alternative (or even better) +> as you can see for most benchmarks, but is beaten as soon as the +> relative weight of random-IO increases (I/O-meter fileserver and +> database benchmarks), the processor on the 1280 is faster than the one +> on the Dell-controller so its faster in sequential IO. +> These benchmarks were not done using postgresql, so you shouldn't read +> them as absolute for all your situations ;-) But you can get a good +> impression I think. +> +> Best regards, +> +> Arjen van der Meijden +> Tweakers.net +> +> ---------------------------(end of broadcast)--------------------------- +> TIP 3: Have you checked our extensive FAQ? +> +> http://www.postgresql.org/docs/faq +> + + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 05:22:42 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 28C4A9FB2FC + for ; + Fri, 8 Sep 2006 05:22:41 -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 62975-06 for + ; + Fri, 8 Sep 2006 05:22:27 -0300 (ADT) +X-Greylist: delayed 00:30:01.315486 by SQLgrey- +Received: from mail.clickspace.com (router2.clickspace.com [65.110.166.227]) + by postgresql.org (Postfix) with ESMTP id 6BA4F9FB2F9 + for ; + Fri, 8 Sep 2006 05:22:29 -0300 (ADT) +Received: from [IPv6:::1] ([192.168.0.48]) + (authenticated user brian@clickspace.com) by mail.clickspace.com + (using TLSv1/SSLv3 with cipher RC4-SHA (128 bits)) + for pgsql-performance@postgresql.org; Fri, 8 Sep 2006 01:52:23 -0600 +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Transfer-Encoding: 7bit +Message-Id: <8FE8AE4A-43AD-4AE5-82B7-6C77BC4A0248@clickspace.com> +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +To: pgsql-performance@postgresql.org +From: Brian Wipf +Subject: Configuring System for Speed +Date: Fri, 8 Sep 2006 01:52:28 -0600 +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/41 +X-Sequence-Number: 20727 + +I am in the process of speccing out a new box for a highly utilized +(updates, inserts, selects) 40GB+ database. I'm trying to maximize +performance on a budget, and I would appreciate any feedback on any +of the following. + +Hardware: +2 - Intel Xeon 5160 3.0 GHz 4MB 1333MHz +8 - Kingston 4GB DDR2 ECC Fully Buffered +16 - WD Raptor 150GB 10000 RPM SATA II HD +1 - 3Ware 9550SX-16ML Serial ATA II RAID card +1 - Supermicro X7DBE+ Motherboard +1 - Supermicro SC836TQ-R800V Case + +The Woodcrest CPU, Raptor HD and 3Ware 9550SX RAID card have all been +highly recommended on this list, so there may not be much to comment +on there. The Supermicro X7DBE+ motherboard is appealing because of +its 16 RAM slots and 64GB of maximum memory. The Supermicro SC836TQ- +R800 case was selected because of its 16 drive bays in 3U and dual +800W power supplies (the motherboard requires 700W). + +RAID Configuration/File System: +A lot of info in the lists, but I'm not sure of the best approach for +this setup. +I was thinking of using 14 drives in a RAID 10 (ext3) for the db and +wals and 2 mirrored drives (ext3 or xfs) for the OS. Another option +would be 12 drives in a RAID 10 for the database (ext3, maybe ext2) +and 4 drives in a RAID 10 for the OS and wals (ext3) (with separate +RAID cards). There are many choices here. Any suggestions? + +OS: +The consensus in the list seems to be as long as you have the 2.6 +Linux Kernel, it's really a matter of personal preference. However, +it's hard to have a preference when you're new to the Linux world, +like I am. Red Hat, Fedora Core, Slackware, Suse, Gentoo? I guess my +primary goal is speed, stability, and ease of use. Any advice here, +no matter how minimal, would be appreciated. + +Thanks, + +Brian Wipf + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 05:45:11 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id D40B69FA4CB + for ; + Fri, 8 Sep 2006 05:45:10 -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 66759-01 for + ; + Fri, 8 Sep 2006 05:44:52 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mi8.com (d01gw02.mi8.com [63.240.6.46]) + by postgresql.org (Postfix) with ESMTP id B98BD9FB1F7 + for ; + Fri, 8 Sep 2006 05:44:53 -0300 (ADT) +Received: from 172.16.1.148 by mail.mi8.com with ESMTP (- Welcome to Mi8 + Corporation www.Mi8.com (D2)); Fri, 08 Sep 2006 04:44:44 -0400 +X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 +Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.160]) by + D01HOST02.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 8 Sep + 2006 04:44:17 -0400 +Received: from 69.181.100.71 ([69.181.100.71]) by MI8NYCMAIL06.Mi8.com ( + [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( + [172.16.1.106]) with Microsoft Exchange Server HTTP-DAV ; Fri, 8 Sep + 2006 08:44:16 +0000 +User-Agent: Microsoft-Entourage/11.2.5.060620 +Date: Fri, 08 Sep 2006 01:44:14 -0700 +Subject: Re: Configuring System for Speed +From: "Luke Lonergan" +To: "Brian Wipf" , + pgsql-performance@postgresql.org +Message-ID: +Thread-Topic: [PERFORM] Configuring System for Speed +Thread-Index: AcbTIvY6NKPhWj8WEduuawAWy4o9DA== +In-Reply-To: <8FE8AE4A-43AD-4AE5-82B7-6C77BC4A0248@clickspace.com> +MIME-Version: 1.0 +X-OriginalArrivalTime: 08 Sep 2006 08:44:17.0373 (UTC) + FILETIME=[F83CF0D0:01C6D322] +X-WSS-ID: 691FF2F62V01723754-07-01 +Content-Type: text/plain; + charset=us-ascii +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.666 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO, RCVD_NUMERIC_HELO +X-Spam-Level: * +X-Archive-Number: 200609/42 +X-Sequence-Number: 20728 + +Brian, + +I like all of the HW - I just thoroughly reviewed this and came to the same +HW choices you did. The new SuperMicro chassis is an improvement on one we +have used for 21 servers like this. + +One modification: we implemented two internal 60GB laptop hard drives with +an additional 3Ware 8006-2LP controller on each machine for the OS. This +frees up all 16 SATA II drives for data. The laptop drives are super stable +and reliable under high heat conditions and they are small, so having them +inside the case is no big deal. BTW - we had ASAcomputers.com make our +systems for us and they did a good job. + +We use CentOS 4 on our lab systems and it works fine. I recommend XFS for +the DBMS data drives, along with RAID10 on the 3Ware controllers. With +normal Postgres you shouldn't expect to get more than about 350MB/s on those +CPUs for a single query, but with increased user count, the RAID10 should +scale fine to about 1200MB/s sequential transfer using XFS and a lot slower +with ext3. + +- Luke + + +On 9/8/06 12:52 AM, "Brian Wipf" wrote: + +> I am in the process of speccing out a new box for a highly utilized +> (updates, inserts, selects) 40GB+ database. I'm trying to maximize +> performance on a budget, and I would appreciate any feedback on any +> of the following. +> +> Hardware: +> 2 - Intel Xeon 5160 3.0 GHz 4MB 1333MHz +> 8 - Kingston 4GB DDR2 ECC Fully Buffered +> 16 - WD Raptor 150GB 10000 RPM SATA II HD +> 1 - 3Ware 9550SX-16ML Serial ATA II RAID card +> 1 - Supermicro X7DBE+ Motherboard +> 1 - Supermicro SC836TQ-R800V Case +> +> The Woodcrest CPU, Raptor HD and 3Ware 9550SX RAID card have all been +> highly recommended on this list, so there may not be much to comment +> on there. The Supermicro X7DBE+ motherboard is appealing because of +> its 16 RAM slots and 64GB of maximum memory. The Supermicro SC836TQ- +> R800 case was selected because of its 16 drive bays in 3U and dual +> 800W power supplies (the motherboard requires 700W). +> +> RAID Configuration/File System: +> A lot of info in the lists, but I'm not sure of the best approach for +> this setup. +> I was thinking of using 14 drives in a RAID 10 (ext3) for the db and +> wals and 2 mirrored drives (ext3 or xfs) for the OS. Another option +> would be 12 drives in a RAID 10 for the database (ext3, maybe ext2) +> and 4 drives in a RAID 10 for the OS and wals (ext3) (with separate +> RAID cards). There are many choices here. Any suggestions? +> +> OS: +> The consensus in the list seems to be as long as you have the 2.6 +> Linux Kernel, it's really a matter of personal preference. However, +> it's hard to have a preference when you're new to the Linux world, +> like I am. Red Hat, Fedora Core, Slackware, Suse, Gentoo? I guess my +> primary goal is speed, stability, and ease of use. Any advice here, +> no matter how minimal, would be appreciated. +> +> Thanks, +> +> Brian Wipf +> +> +> ---------------------------(end of broadcast)--------------------------- +> TIP 6: explain analyze is your friend +> + + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 07:02:01 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id E6F6D9FB2C4 + for ; + Fri, 8 Sep 2006 07:01:58 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 90796-05-2 + for ; + Fri, 8 Sep 2006 10:01:42 +0000 (UTC) +X-Greylist: delayed 00:27:00.279014 by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id 156659FB33B + for ; + Fri, 8 Sep 2006 07:00:04 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from gate.criticalsoftware.com (gate.criticalsoftware.com + [212.13.37.242]) + by svr4.postgresql.org (Postfix) with ESMTP id A39F05AF888 + for ; + Fri, 8 Sep 2006 09:33:01 +0000 (GMT) +Received: by gate.criticalsoftware.com (Postfix, from userid 102) + id 56D203A63F; Fri, 8 Sep 2006 10:29:33 +0100 (WEST) +Received: from [192.168.2.70] (unknown [192.168.2.70]) + by gate.criticalsoftware.com (Postfix) with ESMTP id AE4753B379; + Fri, 8 Sep 2006 09:29:32 +0000 (UTC) +Message-ID: <4501384C.4000506@criticalsoftware.com> +Date: Fri, 08 Sep 2006 10:30:52 +0100 +From: Nuno Alexandre Alves +User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) +MIME-Version: 1.0 +To: pgsql-performance@postgresql.org +Subject: Performance in a 7 TB database. +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Copyrighted-Material: Please visit http://www.criticalsoftware.com +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/43 +X-Sequence-Number: 20729 + +Hi, + +I have a customer who wants a database solution for a 7 TB database. +Insert will be the main action in the database. + +There are some case studies with detail information about performance +and hardware solution on this database size? +What are the minimum hardware requirements for this kind of database? + +Thanks is advance, +Nuno +DISCLAIMER: This message may contain confidential information or privileged material and is intended only for the individual(s) named. If you are not a named addressee and mistakenly received this message you should not copy or otherwise disseminate it: please delete this e-mail from your system and notify the sender immediately. E-mail transmissions are not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. Therefore, the sender does not accept liability for any errors or omissions in the contents of this message that arise as a result of e-mail transmissions. Please request a hard copy version if verification is required. Critical Software, SA. + +From pgsql-performance-owner@postgresql.org Fri Sep 8 08:52:53 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 608339FB357 + for ; + Fri, 8 Sep 2006 08:52:53 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 37709-05 for + ; + Fri, 8 Sep 2006 11:52:39 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 31D6E9F94F3 + for ; + Fri, 8 Sep 2006 08:49:02 -0300 (ADT) +Received: (qmail 10171 invoked from network); 8 Sep 2006 11:48:58 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 8 Sep 2006 11:48:58 -0000 +In-Reply-To: <450104C8.2070709@tweakers.net> +References: <450104C8.2070709@tweakers.net> +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> +Cc: pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with postgresql + and some SAS raid-figures +Date: Fri, 8 Sep 2006 07:48:57 -0400 +To: Arjen van der Meijden +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/44 +X-Sequence-Number: 20730 + +Hi, Arjen, + + +On 8-Sep-06, at 1:51 AM, Arjen van der Meijden wrote: + +> Hi, +> +> We've been running our "webapp database"-benchmark again on mysql +> and postgresql. This time using a Fujitsu-Siemens RX300 S3 machine +> equipped with a 2.66Ghz Woodcrest (5150) and a 3.73Ghz Dempsey +> (5080). And compared those results to our earlier undertaken +> Opteron benchmarks on 2.4GHz' Socket F- and 940-versions (2216, 280). +> +> You can see the english translation here: +> http://tweakers.net/reviews/646 +> +> The Woodcrest is quite a bit faster than the Opterons. Actually... +> With Hyperthreading *enabled* the older Dempsey-processor is also +> faster than the Opterons with PostgreSQL. But then again, it is the +> top-model Dempsey and not a top-model Opteron so that isn't a clear +> win. +> Of course its clear that even a top-Opteron wouldn't beat the +> Dempsey's as easily as it would have beaten the older Xeon's before +> that. + +Why wouldn't you use a top of the line Opteron ? +> +> Again PostgreSQL shows very good scalability, so good even +> HyperThreading adds extra performance to it with 4 cores enabled... +> while MySQL in every version we tested (5.1.9 is not displayed, but +> showed similar performance) was slower with HT enabled. +> +> Further more we received our ordered Dell MD1000 SAS-enclosure +> which has 15 SAS Fujitsu MAX3036RC disks and that unit is +> controlled using a Dell PERC 5/e. +> We've done some benchmarks (unfortunately everything is in Dutch +> for this). +> +> We tested varying amounts of disks in RAID10 (a set of 4,5,6 and 7 +> 2-disk-mirrors striped), RAID50 and RAID5. The interfaces to +> display the results are in a google-stylee beta-state, but here is +> a list of all benchmarks done: +> http://tweakers.net/benchdb/search?query=md1000&ColcomboID=5 +> +> Hover over the left titles to see how many disks and in what raid- +> level was done. Here is a comparison of 14 disk RAID5/50/10's: +> http://tweakers.net/benchdb/testcombo/wide/?TestcomboIDs%5B1156% +> 5D=1&TestcomboIDs%5B1178%5D=1&TestcomboIDs%5B1176% +> 5D=1&DB=Nieuws&Query=Keyword +> +> For raid5 we have some graphs: +> http://tweakers.net/benchdb/testcombo/1156 +> Scroll down to see how adding disks improves performance on it. The +> Areca 1280 with WD Raptor's is a very good alternative (or even +> better) as you can see for most benchmarks, but is beaten as soon +> as the relative weight of random-IO increases (I/O-meter fileserver +> and database benchmarks), the processor on the 1280 is faster than +> the one on the Dell-controller so its faster in sequential IO. +> These benchmarks were not done using postgresql, so you shouldn't +> read them as absolute for all your situations ;-) But you can get a +> good impression I think. +> +> Best regards, +> +> Arjen van der Meijden +> Tweakers.net +> +> ---------------------------(end of +> broadcast)--------------------------- +> TIP 3: Have you checked our extensive FAQ? +> +> http://www.postgresql.org/docs/faq +> + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 09:46:14 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 278749FB338 + for ; + Fri, 8 Sep 2006 09:46:14 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 56159-05 for + ; + Fri, 8 Sep 2006 12:46:02 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from gollum.cambrium.nl (mx1.cambrium.nl [217.19.16.130]) + by postgresql.org (Postfix) with SMTP id 6CAA09FB2A7 + for ; + Fri, 8 Sep 2006 09:44:44 -0300 (ADT) +Received: (qmail 2164 invoked from network); 8 Sep 2006 12:44:40 -0000 +Received: from office.tweakers.net (HELO ?10.0.0.169?) (84.245.2.46) + by gollum.cambrium.nl with SMTP; 8 Sep 2006 12:44:40 -0000 +Message-ID: <45016590.6050905@tweakers.net> +Date: Fri, 08 Sep 2006 14:44:00 +0200 +From: Arjen van der Meijden +User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) +MIME-Version: 1.0 +To: Dave Cramer +CC: pgsql-performance@postgresql.org +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with +References: <450104C8.2070709@tweakers.net> + <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> +In-Reply-To: <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/45 +X-Sequence-Number: 20731 + +Dave Cramer wrote: +> Hi, Arjen, +> +> +>> The Woodcrest is quite a bit faster than the Opterons. Actually... +>> With Hyperthreading *enabled* the older Dempsey-processor is also +>> faster than the Opterons with PostgreSQL. But then again, it is the +>> top-model Dempsey and not a top-model Opteron so that isn't a clear win. +>> Of course its clear that even a top-Opteron wouldn't beat the +>> Dempsey's as easily as it would have beaten the older Xeon's before that. +> +> Why wouldn't you use a top of the line Opteron ? + +What do you mean by this question? Why we didn't test the Opteron 285 +instead of the 280? + +Well, its not that you can just go up to a hardware supplier and pick +exactly the system you want to review/benchmar... especially not with +pre-production hardware that (at the time) wasn't very widely available. +Normally, you just get what system they have available at their +marketing or pre-sales department. + +The Opteron 280 was from an earlier review and was fitted in the "Try +and Buy"-version of the Sun Fire x4200. In that system; you only have a +few options where the 280 was the fastest at the time. + +But then again, systems with the Woodcrest 5150 (the subtop one) and +Opteron 280 (also the subtop one) are about equal in price, so its not a +bad comparison in a bang-for-bucks point of view. The Dempsey was added +to show how both the Opteron and the newer Woodcrest would compete +against that one. + +Best regards, + +Arjen + +From pgsql-performance-owner@postgresql.org Fri Sep 8 09:50:51 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 263629FB35B + for ; + Fri, 8 Sep 2006 09:50:49 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 58078-03 for + ; + Fri, 8 Sep 2006 12:50:39 +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from web60820.mail.yahoo.com (web60820.mail.yahoo.com + [209.73.178.228]) + by postgresql.org (Postfix) with SMTP id 400369FB215 + for ; + Fri, 8 Sep 2006 09:48:26 -0300 (ADT) +Received: (qmail 83666 invoked by uid 60001); 8 Sep 2006 12:48:23 -0000 +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; + h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; + b=WavUGoaB2lDwiXOnsXmJUtYAOTv54ZblOq8IZ8jyb7URweUk9MuvocSSoeKsgsA84F6+t4sfmTtX48ajZbg1HpQ+zxIY2oGZEWVIC0I1fL4SLbjb2h2w/0vNGVyIp/g/ZhBAZj4mO+JyuwMNjOxcChg/q7Ht2opK4zQxuySkDCk= + ; +Message-ID: <20060908124823.83664.qmail@web60820.mail.yahoo.com> +Received: from [84.176.153.145] by web60820.mail.yahoo.com via HTTP; + Fri, 08 Sep 2006 05:48:23 PDT +Date: Fri, 8 Sep 2006 05:48:23 -0700 (PDT) +From: fardeen memon +Subject: Performance problem with joins +To: pgsql-performance@postgresql.org +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: 8bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=3.355 tagged_above=0 required=5 + tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS +X-Spam-Level: *** +X-Archive-Number: 200609/46 +X-Sequence-Number: 20732 + +Hi + +i have a severe performance problem with one of my +views which has 6 to 8 joins .. any help will be +appreciated.. +the view is: + +CREATE OR REPLACE VIEW thsn.trade_view AS +SELECT tra.tra_id, tra.per_id, tra.fir_id, +tra.tra_dcn, tra.tra_startdate::date AS tra_startdate, +tra.tra_enddate::date AS tra_enddate, +tra.tra_highprice, tra.tra_lowprice, tra.tra_shares, +tra.tra_marketvalue, tra.tra_commonsharesheld, +tra.tra_directsharesheld, tra.tra_indirectsharesheld, +tra.fun_id, tra.tra_amended, tra.tra_ownership, +tra.tra_touchdate::date AS tra_touchdate, +tra.tra_cdate, tra.tra_udate, tra.tra_relevant, +tra.tra_type, tra.tra_date::date AS tra_date, +per.per_fullname, fir.fir_name, fir.bra_id, +cac90.pc_perf AS tra_performance90, incac90.pc_perf AS +tra_indexperformance90, cac180.pc_perf AS +tra_performance180, incac180.pc_perf AS +tra_indexperformance180, cac270.pc_perf AS +tra_performance270, incac270.pc_perf AS +tra_indexperformance270, kurl.kur_marketcap AS +tra_marketkap, kurl.kur_close AS tra_close, +thsn.per_letztebewertungkauf(per.per_id, fir.fir_id) +AS per_punktekauf, +thsn.per_letztebewertungverkauf(per.per_id, +fir.fir_id) AS per_punkteverkauf, fun.fun_thid, +fun.fun_name, wp.wp_symbol +FROM thsn.trade tra +JOIN thsn.person per ON tra.per_id = per.per_id +JOIN thsn.firma fir ON tra.fir_id = fir.fir_id +LEFT JOIN thsn.kurs_latest kurl ON ('U'::text || +fir.fir_cusip::text) =kurl.fir_cusip +LEFT JOIN thsn.perfcache90 cac90 ON tra.tra_id = +cac90.tra_id +LEFT JOIN thsn.indexperfcache90 incac90 ON tra.tra_id += incac90.tra_id +LEFT JOIN thsn.perfcache180 cac180 ON tra.tra_id = +cac180.tra_id +LEFT JOIN thsn.indexperfcache180 incac180 ON +tra.tra_id = incac180.tra_id +LEFT JOIN thsn.perfcache270 cac270 ON tra.tra_id = +cac270.tra_id +LEFT JOIN thsn.indexperfcache270 incac270 ON +tra.tra_id = incac270.tra_id +LEFT JOIN thsn.funktion fun ON tra.fun_id = fun.fun_id +LEFT JOIN thsn.wertpapier wp ON fir.wp_id = wp.wp_id; + + +and now if i query this view with this explain query : + +explain select * from thsn.trade_view tra where +tra_date>'2006-05-29' + +the output: + +"Merge Right Join (cost=304605.98..319519.02 +rows=324367 width=370)" +" Merge Cond: ("outer".wp_id = "inner".wp_id)" +" -> Index Scan using pk_wertpapier on wertpapier wp +(cost=0.00..1134.06 rows=30651 width=12)" +" -> Sort (cost=304605.98..305416.90 rows=324367 +width=370)" +" Sort Key: fir.wp_id" +" -> Hash Left Join (cost=102943.82..274914.62 +rows=324367 width=370)" +" Hash Cond: ("outer".fun_id = "inner".fun_id)" +" -> Hash Left Join (cost=102942.07..271019.38 +rows=324367 width=340)" +" Hash Cond: ("outer".tra_id = "inner".tra_id)" +" -> Hash Left Join (cost=71679.05..216585.25 +rows=324367 width=308)" +" Hash Cond: ("outer".tra_id = "inner".tra_id)" +" -> Hash Left Join (cost=53148.50..189791.47 +rows=324367 width=297)" +" Hash Cond: ("outer".tra_id = "inner".tra_id)" +" -> Hash Left Join (cost=25994.49..148209.39 +rows=324367 width=275)" +" Hash Cond: (('U'::text || ("outer".fir_cusip)::text) += ("inner".fir_cusip)::text)" +" -> Hash Join (cost=24702.75..133134.22 rows=324367 +width=264)" +" Hash Cond: ("outer".per_id = "inner".per_id)" +" -> Hash Join (cost=1450.91..99340.45 rows=324367 +width=237)" +" Hash Cond: ("outer".fir_id = "inner".fir_id)" +" -> Seq Scan on trade tra (cost=0.00..88158.53 +rows=324367 width=181)" +" Filter: ((tra_date)::date > '2006-05-29'::date)" +"-> Hash (cost=1374.53..1374.53 rows=30553 width=56)" +"-> Seq Scan on firma fir (cost=0.00..1374.53 +rows=30553 width=56)" +"-> Hash (cost=22629.87..22629.87 rows=248787 +width=27)" +"-> Seq Scan on person per (cost=0.00..22629.87 +rows=248787 width=27)" +"-> Hash (cost=1232.59..1232.59 rows=23659 width=35)" +"-> Seq Scan on kurs_latest kurl (cost=0.00..1232.59 +rows=23659 width=35)" +"-> Hash (cost=17244.44..17244.44 rows=814044 +width=19)" +"-> Seq Scan on perfcache90 cac90 (cost=0.00..17244.44 +rows=814044 width=19)" +" -> Hash (cost=6994.97..6994.97 rows=351797 +width=19)" +" -> Seq Scan on indexperfcache90 incac90 +(cost=0.00..6994.97 rows=351797 width=19)" +" -> Hash (cost=16590.44..16590.44 rows=776044 +width=19)" +" -> Seq Scan on perfcache180 cac180 +(cost=0.00..16590.44 rows=776044 width=19)" +" -> Hash (cost=6704.00..6704.00 rows=336800 +width=18)" +" -> Seq Scan on indexperfcache180 incac180 +(cost=0.00..6704.00 rows=336800 width=18)" +" -> Hash (cost=14755.09..14755.09 rows=695309 +width=19)" +" -> Seq Scan on perfcache270 cac270 +(cost=0.00..14755.09 rows=695309 width=19)" +" -> Hash (cost=6413.93..6413.93 rows=323893 +width=19)" +" -> Seq Scan on indexperfcache270 incac270 +(cost=0.00..6413.93 rows=323893 width=19)" +" -> Hash (cost=1.60..1.60 rows=60 width=34)" +" -> Seq Scan on funktion fun (cost=0.00..1.60 rows=60 +width=34)" + + +and without the joins if i run a explain on this +query: + +EXPLAIN SELECT tra.tra_id, tra.per_id, tra.fir_id, +tra.tra_dcn, tra.tra_startdate::date AS tra_startdate, +tra.tra_enddate::date AS tra_enddate, +tra.tra_highprice, tra.tra_lowprice, tra.tra_shares, +tra.tra_marketvalue, tra.tra_commonsharesheld, +tra.tra_directsharesheld, tra.tra_indirectsharesheld, +tra.fun_id, tra.tra_amended, tra.tra_ownership, +tra.tra_touchdate::date AS tra_touchdate, +tra.tra_cdate, tra.tra_udate, tra.tra_relevant, +tra.tra_type, tra.tra_date::date AS tra_date, +per.per_fullname, fir.fir_name, fir.bra_id, +cac90.pc_perf AS tra_performance90, incac90.pc_perf AS +tra_indexperformance90, cac180.pc_perf AS +tra_performance180, incac180.pc_perf AS +tra_indexperformance180, cac270.pc_perf AS +tra_performance270, incac270.pc_perf AS +tra_indexperformance270, kurl.kur_marketcap AS +tra_marketkap, kurl.kur_close AS tra_close, +thsn.per_letztebewertungkauf(per.per_id, fir.fir_id) +AS per_punktekauf, +thsn.per_letztebewertungverkauf(per.per_id, +fir.fir_id) AS per_punkteverkauf, fun.fun_thid, +fun.fun_name, wp.wp_symbol + +FROM thsn.trade tra , thsn.person per, thsn.firma +fir,thsn.kurs_latest kurl , thsn.perfcache90 cac90, +thsn.indexperfcache90 incac90 , thsn.perfcache180 +cac180 ,thsn.indexperfcache180 incac180 +,thsn.perfcache270 cac270, thsn.indexperfcache270 +incac270 , thsn.funktion fun, thsn.wertpapier wp + +where tra_date>'2006-06-30' and tra.per_id = +per.per_id and tra.fir_id = fir.fir_id and ('U'::text +|| fir.fir_cusip::text) = kurl.fir_cusip::text and +tra.tra_id = cac90.tra_id and tra.tra_id = +incac90.tra_id and tra.tra_id = cac180.tra_id and +tra.tra_id = incac180.tra_id and tra.tra_id = +cac270.tra_id and tra.tra_id = incac270.tra_id and +tra.fun_id = fun.fun_id and fir.wp_id = wp.wp_id + +the output: + +"Nested Loop (cost=64179.28..90645.20 rows=394 +width=370)" +" -> Nested Loop (cost=64179.28..89072.83 rows=394 +width=343)" +" -> Nested Loop (cost=64179.28..87183.66 rows=471 +width=372)" +" -> Nested Loop (cost=64179.28..81962.24 rows=1304 +width=353)" +" -> Nested Loop (cost=64179.28..74632.57 rows=1825 +width=334)" +" -> Merge Join (cost=64179.28..65424.31 rows=2289 +width=315)" +" Merge Cond: ("outer".wp_id = "inner".wp_id)" +" -> Index Scan using pk_wertpapier on wertpapier wp +(cost=0.00..1134.06 rows=30651 width=12)" +" -> Sort (cost=64179.28..64185.15 rows=2349 +width=315)" +" Sort Key: fir.wp_id" +" -> Seq Scan on indexperfcache180 incac180 +(cost=0.00..6704.00 rows=336800 width=18)" +" -> Hash (cost=54717.99..54717.99 rows=9690 +width=267)" +" -> Merge Join (cost=42275.34..54717.99 rows=9690 +width=267)" +" Merge Cond: ("outer".tra_id = "inner".tra_id)" +" -> Index Scan using pk_indexperfcache270 on +indexperfcache270 incac270 (cost=0.00..11393.83 +rows=323893 width=19)" +" -> Sort (cost=42275.34..42348.12 rows=29114 +width=248)" +" Sort Key: tra.tra_id" +" -> Hash Join (cost=4224.87..40116.62 rows=29114 +width=248)" +" Hash Cond: ("outer".fir_id = "inner".fir_id)" +" -> Bitmap Heap Scan on trade tra +(cost=183.96..35201.91 rows=29133 width=181)" +" Recheck Cond: (tra_date > '2006-06-30 +00:00:00'::timestamp without time zone)" +" -> Bitmap Index Scan on trade_date_index +(cost=0.00..183.96 rows=29133 width=0)" +" Index Cond: (tra_date > '2006-06-30 +00:00:00'::timestamp without time zone)" +" -> Hash (cost=3964.57..3964.57 rows=30533 width=67)" +" -> Hash Join (cost=1291.74..3964.57 rows=30533 +width=67)" +" Hash Cond: (('U'::text || ("outer".fir_cusip)::text) += ("inner".fir_cusip)::text)" +" -> Seq Scan on firma fir (cost=0.00..1374.53 +rows=30553 width=56)" +" -> Hash (cost=1232.59..1232.59 rows=23659 width=35)" +" -> Seq Scan on kurs_latest kurl (cost=0.00..1232.59 +rows=23659 width=35)" +" -> Hash (cost=1.60..1.60 rows=60 width=34)" +"-> Seq Scan on funktion fun (cost=0.00..1.60 rows=60 +width=34)" +"-> Index Scan using pk_perfcache180 on perfcache180 +cac180 (cost=0.00..4.01 rows=1 width=19)" +" Index Cond: ("outer".tra_id = cac180.tra_id)" +"-> Index Scan using pk_perfcache270 on perfcache270 +cac270 (cost=0.00..4.00 rows=1 width=19)" +" Index Cond: ("outer".tra_id = cac270.tra_id)" +"-> Index Scan using pk_indexperfcache90 on +indexperfcache90 incac90 (cost=0.00..3.99 rows=1 +width=19)" +"Index Cond: ("outer".tra_id = incac90.tra_id)" +" -> Index Scan using pk_perfcache90 on perfcache90 +cac90 (cost=0.00..4.00 rows=1 width=19)" +" Index Cond: ("outer".tra_id = cac90.tra_id)" +"-> Index Scan using pk_person on person per +(cost=0.00..3.96 rows=1 width=27)" +" Index Cond: ("outer".per_id = per.per_id)" + + +In this case the time taken is much less and also the +index in the tra_date cloumn is considered while with +the view the index is not considered and also other +indexes are not considered. + +What is it that i am doing wrong? + +Thanks in advance. + + +__________________________________________________ +Do You Yahoo!? +Tired of spam? Yahoo! Mail has the best spam protection around +http://mail.yahoo.com + +From pgsql-performance-owner@postgresql.org Fri Sep 8 10:07:39 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 102E89FB38C + for ; + Fri, 8 Sep 2006 10:07:38 -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 94059-01 for + ; + Fri, 8 Sep 2006 10:07:21 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from net2.micro-automation.com (net2.micro-automation.com + [64.7.141.29]) by postgresql.org (Postfix) with SMTP id A2BA39FB3AD + for ; + Fri, 8 Sep 2006 10:02:01 -0300 (ADT) +Received: (qmail 10913 invoked from network); 8 Sep 2006 13:01:58 -0000 +Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) + by net2.micro-automation.com with SMTP; 8 Sep 2006 13:01:58 -0000 +In-Reply-To: <45016590.6050905@tweakers.net> +References: <450104C8.2070709@tweakers.net> + <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> + <45016590.6050905@tweakers.net> +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: <4D290F9E-240D-4F21-A182-8E193BEEA5CB@fastcrypt.com> +Cc: pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Dave Cramer +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with postgresql + and some SAS raid-figures +Date: Fri, 8 Sep 2006 09:01:57 -0400 +To: Arjen van der Meijden +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.037 tagged_above=0 required=5 tests=AWL, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/47 +X-Sequence-Number: 20733 + + +On 8-Sep-06, at 8:44 AM, Arjen van der Meijden wrote: + +> Dave Cramer wrote: +>> Hi, Arjen, +>>> The Woodcrest is quite a bit faster than the Opterons. +>>> Actually... With Hyperthreading *enabled* the older Dempsey- +>>> processor is also faster than the Opterons with PostgreSQL. But +>>> then again, it is the top-model Dempsey and not a top-model +>>> Opteron so that isn't a clear win. +>>> Of course its clear that even a top-Opteron wouldn't beat the +>>> Dempsey's as easily as it would have beaten the older Xeon's +>>> before that. +>> Why wouldn't you use a top of the line Opteron ? +> +> What do you mean by this question? Why we didn't test the Opteron +> 285 instead of the 280? +Yes, that is the question. +> +> Well, its not that you can just go up to a hardware supplier and +> pick exactly the system you want to review/benchmar... especially +> not with pre-production hardware that (at the time) wasn't very +> widely available. +> Normally, you just get what system they have available at their +> marketing or pre-sales department. +Understandable. +> +> The Opteron 280 was from an earlier review and was fitted in the +> "Try and Buy"-version of the Sun Fire x4200. In that system; you +> only have a few options where the 280 was the fastest at the time. + +> +> But then again, systems with the Woodcrest 5150 (the subtop one) +> and Opteron 280 (also the subtop one) are about equal in price, so +> its not a bad comparison in a bang-for-bucks point of view. The +> Dempsey was added to show how both the Opteron and the newer +> Woodcrest would compete against that one. + +Did I read this correctly that one of the Opterons in the test only +had 4G of ram vs 7 G in the Intel boxes ? If so this is a severely +limiting factor for postgresql at least? + +Dave +> +> Best regards, +> +> Arjen +> + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 11:52:24 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 125BC9FB357 + for ; + Fri, 8 Sep 2006 11:52:24 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 00385-06 for + ; + Fri, 8 Sep 2006 14:52:12 +0000 (UTC) +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 7E4609FB3A1 + for ; + Fri, 8 Sep 2006 11:46:19 -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 k88EkGPd008115; + Fri, 8 Sep 2006 10:46:16 -0400 (EDT) +To: fardeen memon +cc: pgsql-performance@postgresql.org +Subject: Re: Performance problem with joins +In-reply-to: <20060908124823.83664.qmail@web60820.mail.yahoo.com> +References: <20060908124823.83664.qmail@web60820.mail.yahoo.com> +Comments: In-reply-to fardeen memon + message dated "Fri, 08 Sep 2006 05:48:23 -0700" +Date: Fri, 08 Sep 2006 10:46:16 -0400 +Message-ID: <8114.1157726776@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/49 +X-Sequence-Number: 20735 + +fardeen memon writes: +> What is it that i am doing wrong? + +I think the forced coercion to date type in the view case is preventing +the planner from making a good guess about the selectivity of the +condition on tra_date. It has stats about tra_date's distribution, +but none about the distribution of "tra_date::date". + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Fri Sep 8 12:04:04 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id BA8E79FB2A7 + for ; + Fri, 8 Sep 2006 12:04:03 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 02813-02 for + ; + Fri, 8 Sep 2006 15:03:42 +0000 (UTC) +X-Greylist: delayed 00:06:40.552642 by SQLgrey- +Received: from rediffmail.com (unknown [202.54.124.238]) + by postgresql.org (Postfix) with SMTP id 9A2C69FB338 + for ; + Fri, 8 Sep 2006 11:58:59 -0300 (ADT) +Received: (qmail 11124 invoked by uid 510); 8 Sep 2006 14:49:32 -0000 +Date: 8 Sep 2006 14:49:32 -0000 +Message-ID: <20060908144932.11123.qmail@webmail54.rediffmail.com> +Received: from unknown (12.158.9.162) by rediffmail.com via HTTP; + 08 sep 2006 14:49:30 -0000 +MIME-Version: 1.0 +From: "Phadnis" +Reply-To: "Phadnis" +To: pgsql-performance@postgresql.org +Subject: unsubscribe me +Content-type: multipart/alternative; + boundary="Next_1157726970---0-202.54.124.238-11072" +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=4.075 tagged_above=0 required=5 + tests=HTML_IMAGE_ONLY_08, HTML_MESSAGE, HTML_SHORT_LINK_IMG_1, + MSGID_FROM_MTA_HEADER +X-Spam-Level: **** +X-Archive-Number: 200609/50 +X-Sequence-Number: 20736 + + This is a multipart mime message + + +--Next_1157726970---0-202.54.124.238-11072 +Content-type: text/plain; + charset=iso-8859-1 +Content-Transfer-Encoding: quoted-printable +Content-Disposition: inline + + =A0=0Ahi=0A=0Aplz unsubscribe me.. =0A=0Ai am sending mail to this id.. fo= +r unsubscribing.. is it correct..=0Amy mail box is gettin flooded..=0A +--Next_1157726970---0-202.54.124.238-11072 +Content-type: text/html; + charset=iso-8859-1 +Content-Transfer-Encoding: quoted-printable +Content-Disposition: inline + +

=0A 
=0Ahi
=0A
=0Aplz unsubscribe me..
=0A
=0Ai am= + sending mail to this id.. for unsubscribing.. is it correct..
=0Amy mai= +l box is gettin flooded..
=0A=0A

=0A

=0A= +=0A +--Next_1157726970---0-202.54.124.238-11072-- + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 12:08:28 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 4FC8A9FB215 + for ; + Fri, 8 Sep 2006 12:08:27 -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 03586-06-2 + for ; + Fri, 8 Sep 2006 12:08:10 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) + by postgresql.org (Postfix) with ESMTP id 1F2509FA38D + for ; + Fri, 8 Sep 2006 12:08:09 -0300 (ADT) +Received: from localhost (localhost [127.0.0.1]) + by mail.mnc.ch (Postfix) with ESMTP id DC493A82D9; + Fri, 8 Sep 2006 17:13:22 +0200 (CEST) +Received: from mail.mnc.ch ([127.0.0.1]) + by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, + port 10025) with ESMTP + id 09142-03; Fri, 8 Sep 2006 17:13:21 +0200 (CEST) +Received: from meuh.mnc.lan (62-2-77-204.static.cablecom.ch [62.2.77.204]) + by mail.mnc.ch (Postfix) with ESMTP id 8F178A82B6; + Fri, 8 Sep 2006 17:13:21 +0200 (CEST) +Received: by meuh.mnc.lan (Postfix, from userid 1000) + id DE2E5183692; Fri, 8 Sep 2006 17:07:23 +0200 (CEST) +To: "Phadnis" +Cc: pgsql-performance@postgresql.org +Subject: Re: unsubscribe me +References: <20060908144932.11123.qmail@webmail54.rediffmail.com> +X-Hashcash: + 1:20:060908:shphadnis@rediffmail.com::rFugoq081qfoDzRM:00000000000000000000000000000000000004IEs +X-Hashcash: + 1:20:060908:pgsql-performance@postgresql.org::EPjUXEDPMrx7wvz6:000000000000000000000000000003rYv +From: Guillaume Cottenceau +Date: 08 Sep 2006 17:07:23 +0200 +In-Reply-To: <20060908144932.11123.qmail@webmail54.rediffmail.com> +Message-ID: <87k64e8kic.fsf@meuh.mnc.lan> +Lines: 14 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: amavisd-new at mnc.ch +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/51 +X-Sequence-Number: 20737 + +"Phadnis" writes: + +> plz unsubscribe me.. +> +> i am sending mail to this id.. for unsubscribing.. is it correct.. +> my mail box is gettin flooded.. + +you managed to subscribe, you'll probably manage to unsubcribe. + +hint: the email headers contain the information for unsubscribing. + +-- +Guillaume Cottenceau +Create your personal SMS or WAP Service - visit http://mobilefriends.ch/ + +From pgsql-performance-owner@postgresql.org Fri Sep 8 13:08:41 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 63A979FB265 + for ; + Fri, 8 Sep 2006 13:08:40 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 26070-07 for + ; + Fri, 8 Sep 2006 16:08:19 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from olive.qinip.net (olive.qinip.net [62.100.30.40]) + by postgresql.org (Postfix) with ESMTP id E61009FB1E1 + for ; + Fri, 8 Sep 2006 13:01:31 -0300 (ADT) +Received: from [127.0.0.1] (h8441139206.dsl.speedlinq.nl [84.41.139.206]) + by olive.qinip.net (Postfix) with ESMTP id 8872A18283; + Fri, 8 Sep 2006 18:01:28 +0200 (MEST) +Message-ID: <450193DB.7080104@tweakers.net> +Date: Fri, 08 Sep 2006 18:01:31 +0200 +From: Arjen van der Meijden +User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) +MIME-Version: 1.0 +To: Dave Cramer +CC: pgsql-performance@postgresql.org +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with +References: <450104C8.2070709@tweakers.net> + <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> + <45016590.6050905@tweakers.net> + <4D290F9E-240D-4F21-A182-8E193BEEA5CB@fastcrypt.com> +In-Reply-To: <4D290F9E-240D-4F21-A182-8E193BEEA5CB@fastcrypt.com> +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Antivirus: avast! (VPS 0636-3, 08-09-2006), Outbound message +X-Antivirus-Status: Clean +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/52 +X-Sequence-Number: 20738 + +On 8-9-2006 15:01 Dave Cramer wrote: +> +>> But then again, systems with the Woodcrest 5150 (the subtop one) and +>> Opteron 280 (also the subtop one) are about equal in price, so its not +>> a bad comparison in a bang-for-bucks point of view. The Dempsey was +>> added to show how both the Opteron and the newer Woodcrest would +>> compete against that one. +> +> Did I read this correctly that one of the Opterons in the test only had +> 4G of ram vs 7 G in the Intel boxes ? If so this is a severely limiting +> factor for postgresql at least? + +Actually, its not in this benchmark. Its not a large enough dataset to +put any pressure on IO, not even with just 2GB of memory. + +But, to display it more acurately have a look here: +http://tweakers.net/reviews/638/2 and then scroll down to the bottom-graph. +As you can see, the 8GB-version was faster, but not that much to call it +'severely'. Unfortunately, the system just wasn't very stable with that +8GB memory (it was other memory, not just more). So we couldn't finish +much benchmarks with it and decided, partially based on this graph to +just go for the 4GB. + +Anyway, you can always compare the results of the Woodcrest with the Sun +Fire x4200-results (called 'Opteron DDR' or 'Opteron 940' in the latest +article) to see how a Opteron with 8GB of memory compares to the Woodcrest. + +More of those results can be found in this english article: +http://tweakers.net/reviews/638 +And in this Dutch one: +http://tweakers.net/reviews/633 + +From pgsql-performance-owner@postgresql.org Fri Sep 8 13:19:16 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id C994B9FB225 + for ; + Fri, 8 Sep 2006 13:19:15 -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 10277-05-3 + for ; + Fri, 8 Sep 2006 13:19:03 -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 F3F5E9FB1DF + for ; + Fri, 8 Sep 2006 13:19:00 -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 1GLj46-000BDC-Lp; Fri, 08 Sep 2006 18:18:56 +0200 +Message-ID: <450197EA.7040900@kaltenbrunner.cc> +Date: Fri, 08 Sep 2006 18:18:50 +0200 +From: Stefan Kaltenbrunner +User-Agent: Thunderbird 1.5.0.4 (X11/20060713) +MIME-Version: 1.0 +To: Arjen van der Meijden +CC: Dave Cramer , pgsql-performance@postgresql.org +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with +References: <450104C8.2070709@tweakers.net> + <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> + <45016590.6050905@tweakers.net> + <4D290F9E-240D-4F21-A182-8E193BEEA5CB@fastcrypt.com> + <450193DB.7080104@tweakers.net> +In-Reply-To: <450193DB.7080104@tweakers.net> +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-Spam-Status: No, hits=0.201 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/53 +X-Sequence-Number: 20739 + +Arjen van der Meijden wrote: +> On 8-9-2006 15:01 Dave Cramer wrote: +>> +>>> But then again, systems with the Woodcrest 5150 (the subtop one) and +>>> Opteron 280 (also the subtop one) are about equal in price, so its +>>> not a bad comparison in a bang-for-bucks point of view. The Dempsey +>>> was added to show how both the Opteron and the newer Woodcrest would +>>> compete against that one. +>> +>> Did I read this correctly that one of the Opterons in the test only +>> had 4G of ram vs 7 G in the Intel boxes ? If so this is a severely +>> limiting factor for postgresql at least? +> +> Actually, its not in this benchmark. Its not a large enough dataset to +> put any pressure on IO, not even with just 2GB of memory. + +interesting - so this is a mostly CPU-bound benchmark ? +Out of curiousity have you done any profiling on the databases under +test to see where they are spending their time ? + + +Stefan + +From pgsql-performance-owner@postgresql.org Fri Sep 8 13:19:31 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 73FEA9FB35B + for ; + Fri, 8 Sep 2006 13:19:30 -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 10277-05-4 + for ; + Fri, 8 Sep 2006 13:19:15 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) + by postgresql.org (Postfix) with ESMTP id 410BB9FB1C6 + for ; + Fri, 8 Sep 2006 13:19:12 -0300 (ADT) +Received: from [209.162.219.253] (helo=dogma.v10.wvs) + by servata.com with esmtpa (Exim 4.50) + id 1GLj4F-0006Nt-Go; Fri, 08 Sep 2006 09:18:59 -0700 +Subject: Re: Performance in a 7 TB database. +From: Jeff Davis +To: Nuno Alexandre Alves +Cc: pgsql-performance@postgresql.org +In-Reply-To: <4501384C.4000506@criticalsoftware.com> +References: <4501384C.4000506@criticalsoftware.com> +Content-Type: text/plain +Date: Fri, 08 Sep 2006 09:19:00 -0700 +Message-Id: <1157732340.4393.6.camel@dogma.v10.wvs> +Mime-Version: 1.0 +X-Mailer: Evolution 2.0.4 (2.0.4-7) +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.244 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO, SPF_HELO_PASS +X-Spam-Level: +X-Archive-Number: 200609/54 +X-Sequence-Number: 20740 + +On Fri, 2006-09-08 at 10:30 +0100, Nuno Alexandre Alves wrote: +> Hi, +> +> I have a customer who wants a database solution for a 7 TB database. +> Insert will be the main action in the database. +> +> There are some case studies with detail information about performance +> and hardware solution on this database size? +> What are the minimum hardware requirements for this kind of database? +> + +This is a good place to start: +http://www.postgresql.org/about/users + +I would expect that the case studies for databases greater than 7TB are +few and far between (for any database software). If you decide +PostgreSQL is right, I'm sure the advocacy mailing list would like to +see your case study when you are finished. + +Your hardware requirements mostly depend on how you're going to use the +data. If you expect that most of the data will never be read, and that +the database will be more of an archive, the requirements might be quite +reasonable. However, if or when you do need to search through that data, +expect it to take a long time. + +Regards, + Jeff Davis + + +From pgsql-performance-owner@postgresql.org Fri Sep 8 13:46:33 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 8A8E59FB345 + for ; + Fri, 8 Sep 2006 13:46:31 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 47094-05-3 + for ; + Fri, 8 Sep 2006 16:46:01 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from olive.qinip.net (olive.qinip.net [62.100.30.40]) + by postgresql.org (Postfix) with ESMTP id 25E589F9945 + for ; + Fri, 8 Sep 2006 13:45:48 -0300 (ADT) +Received: from [127.0.0.1] (h8441139206.dsl.speedlinq.nl [84.41.139.206]) + by olive.qinip.net (Postfix) with ESMTP id C1E1B1826F; + Fri, 8 Sep 2006 18:45:44 +0200 (MEST) +Message-ID: <45019E3C.2010603@tweakers.net> +Date: Fri, 08 Sep 2006 18:45:48 +0200 +From: Arjen van der Meijden +User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) +MIME-Version: 1.0 +To: Stefan Kaltenbrunner +CC: Dave Cramer , pgsql-performance@postgresql.org +Subject: Re: Xeon Woodcrest/Dempsey vs Opteron Socket F/940 with +References: <450104C8.2070709@tweakers.net> + <398A981F-5DE4-4845-ACF7-BB5777CECF05@fastcrypt.com> + <45016590.6050905@tweakers.net> + <4D290F9E-240D-4F21-A182-8E193BEEA5CB@fastcrypt.com> + <450193DB.7080104@tweakers.net> <450197EA.7040900@kaltenbrunner.cc> +In-Reply-To: <450197EA.7040900@kaltenbrunner.cc> +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Antivirus: avast! (VPS 0636-3, 08-09-2006), Outbound message +X-Antivirus-Status: Clean +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/55 +X-Sequence-Number: 20741 + +On 8-9-2006 18:18 Stefan Kaltenbrunner wrote: +> +> interesting - so this is a mostly CPU-bound benchmark ? +> Out of curiousity have you done any profiling on the databases under +> test to see where they are spending their time ? + +Yeah, it is. + +We didn't do any profiling. +We had a Sun-engineer visit us to see why MySQL performed so bad on the +T2000 and he has done some profiling, but that is of course just a small +and specific part of our total set of benchmarks. +Postgresql was mostly left out of that picture since it performed pretty +well (although it may even do better with more tuning and profiling). + +We are/were not interested enough in the profiling-part, since we just +run the benchmark to see how fast each system is. Not really to see how +fast each database is or why a database is faster on X or Y. + +The latter is of course pretty interesting, but also requires quite a +bit of knowledge of the internals and a bit of time to analyze the +results... + +Best regards, + +Arjen + +From pgsql-performance-owner@postgresql.org Fri Sep 8 11:43:34 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 3CFE39FB380 + for ; + Fri, 8 Sep 2006 11:43:33 -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 02912-03 for + ; + Fri, 8 Sep 2006 11:43:20 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id BF0439FB359 + for ; + Fri, 8 Sep 2006 11:43:19 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from gamma.datatechlabs.com (unknown [83.223.156.5]) + by svr4.postgresql.org (Postfix) with ESMTP id EF19E5AF8BD + for ; + Fri, 8 Sep 2006 14:43:16 +0000 (GMT) +Received: from [10.1.1.205] (unknown [83.223.156.4]) + by gamma.datatechlabs.com (Postfix) with ESMTP id 62FED1CC11; + Fri, 8 Sep 2006 14:34:30 +0000 (UTC) +Message-ID: <4501AC5F.5080103@datatechlabs.com> +Date: Fri, 08 Sep 2006 17:46:07 +0000 +From: alvis +User-Agent: Thunderbird 1.5.0.5 (X11/20060831) +MIME-Version: 1.0 +To: Brian Wipf +Cc: pgsql-performance@postgresql.org +Subject: Re: Configuring System for Speed +References: <8FE8AE4A-43AD-4AE5-82B7-6C77BC4A0248@clickspace.com> +In-Reply-To: <8FE8AE4A-43AD-4AE5-82B7-6C77BC4A0248@clickspace.com> +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=3.103 tagged_above=0 required=5 + tests=DATE_IN_FUTURE_03_06, SPF_FAIL +X-Spam-Level: *** +X-Archive-Number: 200609/48 +X-Sequence-Number: 20734 + +Brian Wipf wrote: +> I am in the process of speccing out a new box for a highly utilized +> (updates, inserts, selects) 40GB+ database. I'm trying to maximize +> performance on a budget, and I would appreciate any feedback on any of +> the following. +> +Perhaps this is off topic, but here is bit from my experience. Using +single server for both read (select) and write (insert, update, delete) +operations is the way to slow things down. Consider to split query +workload into OLTP and OLAP queries . Set up Slony replication and use +slave server for read operations only . Buy 1 cheap box (slave) and +another more expensive one for master. Keep in mind that DB schema +optimization for particular query workload is essential . You just can +not get good performance for selects if schema is optimized for inserts +and vice versa. +> +> OS: +> The consensus in the list seems to be as long as you have the 2.6 +> Linux Kernel, it's really a matter of personal preference. However, +> it's hard to have a preference when you're new to the Linux world, +> like I am. Red Hat, Fedora Core, Slackware, Suse, Gentoo? I guess my +> primary goal is speed, stability, and ease of use. Any advice here, no +> matter how minimal, would be appreciated. +My answer is FreeBSD6.1. +> +> Thanks, +> +> Brian Wipf +> +> +> ---------------------------(end of broadcast)--------------------------- +> TIP 6: explain analyze is your friend + + +-- +Best Regards, +Alvis + + +From pgsql-performance-owner@postgresql.org Sat Sep 9 11:48:45 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id EBCFE9F9F79 + for ; + Sat, 9 Sep 2006 11:48:43 -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 67514-02 for + ; + Sat, 9 Sep 2006 11:48:34 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id 037B39F94F3 + for ; + Sat, 9 Sep 2006 11:48:34 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from elasmtp-scoter.atl.sa.earthlink.net + (elasmtp-scoter.atl.sa.earthlink.net [209.86.89.67]) + by svr4.postgresql.org (Postfix) with ESMTP id DA1445AF895 + for ; + Sat, 9 Sep 2006 14:48:33 +0000 (GMT) +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; + d=earthlink.net; + b=VR/YAqzGXb+IqoKXvm8eWBAxK63zrlFoUGN5464dJnj5zv2yBzfeA7nCF5b0Txb9; + h=Received:Message-Id:X-Mailer:Date:To:From:Subject:In-Reply-To:References:Mime-Version:Content-Type:X-ELNK-Trace:X-Originating-IP; +Received: from [71.243.1.211] (helo=rpeace101.earthlink.net) + by elasmtp-scoter.atl.sa.earthlink.net with asmtp + (TLSv1:AES256-SHA:256) (Exim 4.34) + id 1GM48F-00073H-A4; Sat, 09 Sep 2006 10:48:31 -0400 +Message-Id: <7.0.1.0.2.20060909103415.03e092b8@earthlink.net> +X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 +Date: Sat, 09 Sep 2006 10:48:20 -0400 +To: "Brian Wipf" , + pgsql-performance@postgresql.org +From: Ron +Subject: Re: Configuring System for Speed +In-Reply-To: +References: <8FE8AE4A-43AD-4AE5-82B7-6C77BC4A0248@clickspace.com> + +Mime-Version: 1.0 +Content-Type: text/plain; charset="us-ascii"; format=flowed +X-ELNK-Trace: + acd68a6551193be5d780f4a490ca69563f9fea00a6dd62bc0a7bc6a88793c8260ec25895d81018f9350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c +X-Originating-IP: 71.243.1.211 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 + tests=DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO +X-Spam-Level: +X-Archive-Number: 200609/56 +X-Sequence-Number: 20742 + +I agree with Luke's comments, although Luke knows I'm an unabashed +Areca admirer where RAID controllers are concerned. +As tweakers.net recently reaffirmed, Areca cards with 1GB of BB cache +on them are faster than the AMCC/3Ware 9550 series. + +Where Linux kernels are concerned, make sure you are at least at +2.6.15 Most decent distros will be. + +4GB DIMMs are still much more than 2x as expensive per than 2GB DIMMs +are. You may want to buy 16 2GB DIMMs instead of 8 4GB DIMMs given +the current price difference. Especially if you won't be upgrading +your RAM for a while. + +Ron + + +At 04:44 AM 9/8/2006, Luke Lonergan wrote: +>Brian, +> +>I like all of the HW - I just thoroughly reviewed this and came to the same +>HW choices you did. The new SuperMicro chassis is an improvement on one we +>have used for 21 servers like this. +> +>One modification: we implemented two internal 60GB laptop hard drives with +>an additional 3Ware 8006-2LP controller on each machine for the OS. This +>frees up all 16 SATA II drives for data. The laptop drives are super stable +>and reliable under high heat conditions and they are small, so having them +>inside the case is no big deal. BTW - we had ASAcomputers.com make our +>systems for us and they did a good job. +> +>We use CentOS 4 on our lab systems and it works fine. I recommend XFS for +>the DBMS data drives, along with RAID10 on the 3Ware controllers. With +>normal Postgres you shouldn't expect to get more than about 350MB/s on those +>CPUs for a single query, but with increased user count, the RAID10 should +>scale fine to about 1200MB/s sequential transfer using XFS and a lot slower +>with ext3. +> +>- Luke +> +> +>On 9/8/06 12:52 AM, "Brian Wipf" wrote: +> +> > I am in the process of speccing out a new box for a highly utilized +> > (updates, inserts, selects) 40GB+ database. I'm trying to maximize +> > performance on a budget, and I would appreciate any feedback on any +> > of the following. +> > +> > Hardware: +> > 2 - Intel Xeon 5160 3.0 GHz 4MB 1333MHz +> > 8 - Kingston 4GB DDR2 ECC Fully Buffered +> > 16 - WD Raptor 150GB 10000 RPM SATA II HD +> > 1 - 3Ware 9550SX-16ML Serial ATA II RAID card +> > 1 - Supermicro X7DBE+ Motherboard +> > 1 - Supermicro SC836TQ-R800V Case +> > +> > The Woodcrest CPU, Raptor HD and 3Ware 9550SX RAID card have all been +> > highly recommended on this list, so there may not be much to comment +> > on there. The Supermicro X7DBE+ motherboard is appealing because of +> > its 16 RAM slots and 64GB of maximum memory. The Supermicro SC836TQ- +> > R800 case was selected because of its 16 drive bays in 3U and dual +> > 800W power supplies (the motherboard requires 700W). +> > +> > RAID Configuration/File System: +> > A lot of info in the lists, but I'm not sure of the best approach for +> > this setup. +> > I was thinking of using 14 drives in a RAID 10 (ext3) for the db and +> > wals and 2 mirrored drives (ext3 or xfs) for the OS. Another option +> > would be 12 drives in a RAID 10 for the database (ext3, maybe ext2) +> > and 4 drives in a RAID 10 for the OS and wals (ext3) (with separate +> > RAID cards). There are many choices here. Any suggestions? +> > +> > OS: +> > The consensus in the list seems to be as long as you have the 2.6 +> > Linux Kernel, it's really a matter of personal preference. However, +> > it's hard to have a preference when you're new to the Linux world, +> > like I am. Red Hat, Fedora Core, Slackware, Suse, Gentoo? I guess my +> > primary goal is speed, stability, and ease of use. Any advice here, +> > no matter how minimal, would be appreciated. +> > +> > Thanks, +> > +> > Brian Wipf +> > +> > +> > ---------------------------(end of broadcast)--------------------------- +> > TIP 6: explain analyze is your friend +> > +> +> +> +>---------------------------(end of broadcast)--------------------------- +>TIP 5: don't forget to increase your free space map settings + + +From pgsql-performance-owner@postgresql.org Mon Sep 11 08:29:23 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 2FB3F9FB1CD + for ; + Mon, 11 Sep 2006 08:29:23 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 50256-03 for + ; + Mon, 11 Sep 2006 11:29:15 +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey- +Received: from web60815.mail.yahoo.com (web60815.mail.yahoo.com + [209.73.178.238]) + by postgresql.org (Postfix) with SMTP id F324E9FA5F7 + for ; + Mon, 11 Sep 2006 08:29:14 -0300 (ADT) +Received: (qmail 63080 invoked by uid 60001); 11 Sep 2006 11:29:13 -0000 +DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; + h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; + b=rE1rLXqkmL2luU1K2u4hKjoiKxSNTEAM2rirvLXym0XOKjZW6HrFYV7Qs89dUSoTmbd5bE8qQozZYWPyk6QRriUA1eX4/I4aEUqoT5FHUzCR8RAEQLUuc/unsvzIGwVqJevdPUw86uBODHBBDeDfQnQOfOBtVDfDP9kS1JJN5vA= + ; +Message-ID: <20060911112913.63078.qmail@web60815.mail.yahoo.com> +Received: from [84.176.156.139] by web60815.mail.yahoo.com via HTTP; + Mon, 11 Sep 2006 04:29:13 PDT +Date: Mon, 11 Sep 2006 04:29:13 -0700 (PDT) +From: fardeen memon +Subject: Re: Performance problem with joins +To: pgsql-performance@postgresql.org +In-Reply-To: <8114.1157726776@sss.pgh.pa.us> +MIME-Version: 1.0 +Content-Type: multipart/alternative; boundary="0-1416824215-1157974153=:62851" +Content-Transfer-Encoding: 8bit +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=3.73 tagged_above=0 required=5 + tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, + HTML_30_40, HTML_MESSAGE +X-Spam-Level: *** +X-Archive-Number: 200609/57 +X-Sequence-Number: 20743 + +--0-1416824215-1157974153=:62851 +Content-Type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: 8bit + +Thanks for the reply .. you are right after i changed tra_date to timestamp in the view it considered the index and the performance did increase a bit .. but still compared to the query without the joins its much less .. any idea why? + + here is the output of the explain query after changing the tra_date column to timestamp. + + "Merge Right Join (cost=229025.77..231549.17 rows=32995 width=366)" + "Merge Cond: ("outer".wp_id = "inner".wp_id)" + "-> Index Scan using pk_wertpapier on wertpapier wp (cost=0.00..1132.90 rows=30654 width=12)" + "-> Sort (cost=229025.77..229108.26 rows=32995 width=366)" + " Sort Key: fir.wp_id" + "-> Hash Left Join (cost=190376.33..226549.51 rows=32995 width=366)" + " Hash Cond: ("outer".fun_id = "inner".fun_id)" + "-> Hash Left Join (cost=190374.58..226147.09 rows=32995 width=336)" + " Hash Cond: ("outer".tra_id = "inner".tra_id)" + "-> Merge Right Join (cost=182608.86..211107.70 rows=32995 width=326)" + " Merge Cond: ("outer".tra_id = "inner".tra_id)" + "-> Index Scan using uk1_perfcache270 on perfcache270 cac270 (cost=0.00..26360.00 rows=695309 width=19)" + "-> Sort (cost=182608.86..182691.35 rows=32995 width=315)" + " Sort Key: tra.tra_id" + "-> Hash Left Join (cost=143070.31..180132.60 rows=32995 width=315)" + " Hash Cond: ("outer".tra_id = "inner".tra_id)" + "-> Hash Left Join (cost=134981.89..163162.72 rows=32995 width=305)" + " Hash Cond: ("outer".tra_id = "inner".tra_id)" + "-> Merge Right Join (cost=116451.34..130707.85 rows=32995 width=294)" + " Merge Cond: ("outer".tra_id = "inner".tra_id)" + "-> Index Scan using pk_indexperfcache90 on indexperfcache90 incac90 (cost=0.00..12969.65 rows=395189 width=18)" + "-> Sort (cost=116451.34..116533.83 rows=32995 width=284)" + " Sort Key: tra.tra_id" + "-> Merge Right Join (cost=80758.34..113975.08 rows=32995 width=284)" + " Merge Cond: ("outer".tra_id = "inner".tra_id)" + "-> Index Scan using uk1_perfcache90 on perfcache90 cac90 (cost=0.00..30740.84 rows=814044 width=19)" + "-> Sort (cost=80758.34..80840.83 rows=32995 width=273)" + " Sort Key: tra.tra_id" + "-> Hash Left Join (cost=26205.11..78282.08 rows=32995 width=273)" + " Hash Cond: (('U'::text || ("outer".fir_cusip)::text) = ("inner".fir_cusip)::text)" + "-> Hash Join (cost=24911.18..75586.30 rows=32995 width=263)" + " Hash Cond: ("outer".per_id = "inner".per_id)" + "-> Hash Join (cost=1658.41..40649.44 rows=32995 width=236)" + " Hash Cond: ("outer".fir_id = "inner".fir_id)" + "-> Bitmap Heap Scan on trade tra (cost=207.48..38208.67 rows=32995 width=180)" + " Recheck Cond: (tra_date > '2006-06-30 00:00:00'::timestamp without time zone)" + "-> Bitmap Index Scan on trade_date_index (cost=0.00..207.48 rows=32995 width=0)" + " Index Cond: (tra_date > '2006-06-30 00:00:00'::timestamp without time zone)" + "-> Hash (cost=1374.54..1374.54 rows=30554 width=56)" + "-> Seq Scan on firma fir (cost=0.00..1374.54 rows=30554 width=56)" + "-> Hash (cost=22630.62..22630.62 rows=248862 width=27)" + "-> Seq Scan on person per (cost=0.00..22630.62 rows=248862 width=27)" + "-> Hash (cost=1234.74..1234.74 rows=23674 width=34)" + "-> Seq Scan on kurs_latest kurl (cost=0.00..1234.74 rows=23674 width=34)" + "-> Hash (cost=16590.44..16590.44 rows=776044 width=19)" + "-> Seq Scan on perfcache180 cac180 (cost=0.00..16590.44 rows=776044 width=19)" + "-> Hash (cost=7137.93..7137.93 rows=380193 width=18)" + "-> Seq Scan on indexperfcache180 incac180 (cost=0.00..7137.93 rows=380193 width=18)" + "-> Hash (cost=6847.57..6847.57 rows=367257 width=18)" + "-> Seq Scan on indexperfcache270 incac270 (cost=0.00..6847.57 rows=367257 width=18)" + "-> Hash (cost=1.60..1.60 rows=60 width=34)" + "-> Seq Scan on funktion fun (cost=0.00..1.60 rows=60 width=34)" + + + It is still doing a sequence scan on the person , perfcache180 and perfcache270 table and with out the joins it performs a index scan on these tables. + + Is something wrong with the view? + + once again thanks for your help. + +Tom Lane wrote: fardeen memon writes: +> What is it that i am doing wrong? + +I think the forced coercion to date type in the view case is preventing +the planner from making a good guess about the selectivity of the +condition on tra_date. It has stats about tra_date's distribution, +but none about the distribution of "tra_date::date". + + regards, tom lane + + + +--------------------------------- +Stay in the know. Pulse on the new Yahoo.com. Check it out. +--0-1416824215-1157974153=:62851 +Content-Type: text/html; charset=iso-8859-1 +Content-Transfer-Encoding: 8bit + +Thanks for the reply .. you are right after i changed  tra_date to timestamp in the view it considered the index and the performance did increase a bit .. but still compared to the query without the joins its much less .. any idea why?

here is the output of the explain query after changing the tra_date column to timestamp.

"Merge Right Join  (cost=229025.77..231549.17 rows=32995 width=366)"
"Merge Cond: ("outer".wp_id = "inner".wp_id)"
"->  Index Scan using pk_wertpapier on wertpapier wp  (cost=0.00..1132.90 rows=30654 width=12)"
"->  Sort  (cost=229025.77..229108.26 rows=32995 width=366)"
"    Sort Key: fir.wp_id"
"->  Hash Left Join  (cost=190376.33..226549.51 rows=32995 width=366)"
"    Hash Cond: ("outer".fun_id = "inner".fun_id)"
"->  Hash Left Join  (cost=190374.58..226147.09 rows=32995 + width=336)"
"    Hash Cond: ("outer".tra_id = "inner".tra_id)"
"->  Merge Right Join  (cost=182608.86..211107.70 rows=32995 width=326)"
"    Merge Cond: ("outer".tra_id = "inner".tra_id)"
"->  Index Scan using uk1_perfcache270 on perfcache270 cac270  (cost=0.00..26360.00 rows=695309 width=19)"
"->  Sort  (cost=182608.86..182691.35 rows=32995 width=315)"
"    Sort Key: tra.tra_id"
"->  Hash Left Join  (cost=143070.31..180132.60 rows=32995 width=315)"
"    Hash Cond: ("outer".tra_id = "inner".tra_id)"
"->  Hash Left Join  (cost=134981.89..163162.72 rows=32995 width=305)"
"    Hash Cond: ("outer".tra_id = "inner".tra_id)"
"->  Merge Right Join  (cost=116451.34..130707.85 rows=32995 width=294)"
"    Merge Cond: ("outer".tra_id + = "inner".tra_id)"
"->  Index Scan using pk_indexperfcache90 on indexperfcache90 incac90  (cost=0.00..12969.65 rows=395189 width=18)"
"->  Sort  (cost=116451.34..116533.83 rows=32995 width=284)"
"    Sort Key: tra.tra_id"
"->  Merge Right Join  (cost=80758.34..113975.08 rows=32995 width=284)"
"    Merge Cond: ("outer".tra_id = "inner".tra_id)"
"->  Index Scan using uk1_perfcache90 on perfcache90 cac90  (cost=0.00..30740.84 rows=814044 width=19)"
"->  Sort  (cost=80758.34..80840.83 rows=32995 width=273)"
"    Sort Key: tra.tra_id"
"->  Hash Left Join  (cost=26205.11..78282.08 rows=32995 width=273)"
"    Hash Cond: (('U'::text || ("outer".fir_cusip)::text) = ("inner".fir_cusip)::text)"
"->  Hash Join  (cost=24911.18..75586.30 rows=32995 + width=263)"
"    Hash Cond: ("outer".per_id = "inner".per_id)"
"->  Hash Join  (cost=1658.41..40649.44 rows=32995 width=236)"
"    Hash Cond: ("outer".fir_id = "inner".fir_id)"
"->  Bitmap Heap Scan on trade tra  (cost=207.48..38208.67 rows=32995 width=180)"
"    Recheck Cond: (tra_date > '2006-06-30 00:00:00'::timestamp without time zone)"
"->  Bitmap Index Scan on trade_date_index  (cost=0.00..207.48 rows=32995 width=0)"
"    Index Cond: (tra_date > '2006-06-30 00:00:00'::timestamp without time zone)"
"->  Hash  (cost=1374.54..1374.54 rows=30554 width=56)"
"->  Seq Scan on firma fir  (cost=0.00..1374.54 rows=30554 width=56)"
"->  Hash  (cost=22630.62..22630.62 rows=248862 width=27)"
"->  Seq Scan on person per  (cost=0.00..22630.62 rows=248862 width=27)"
"->  Hash  (cost=1234.74..1234.74 rows=23674 width=34)"
"->  Seq Scan on kurs_latest kurl  (cost=0.00..1234.74 rows=23674 width=34)"
"->  Hash  (cost=16590.44..16590.44 rows=776044 width=19)"
"->  Seq Scan on perfcache180 cac180  (cost=0.00..16590.44 rows=776044 width=19)"
"->  Hash  (cost=7137.93..7137.93 rows=380193 width=18)"
"->  Seq Scan on indexperfcache180 incac180  (cost=0.00..7137.93 rows=380193 width=18)"
"->  Hash  (cost=6847.57..6847.57 rows=367257 width=18)"
"->  Seq Scan on indexperfcache270 incac270  (cost=0.00..6847.57 rows=367257 width=18)"
"->  Hash  (cost=1.60..1.60 rows=60 width=34)"
"->  Seq Scan on funktion fun  (cost=0.00..1.60 rows=60 width=34)"


It is still doing a sequence scan on the person , perfcache180 and perfcache270 table and with out the joins it performs a index scan on these tables.

Is something wrong with the view?

once again thanks for your help.

Tom Lane <tgl@sss.pgh.pa.us> wrote:
fardeen memon writes:
> What is it that i am doing + wrong?

I think the forced coercion to date type in the view case is preventing
the planner from making a good guess about the selectivity of the
condition on tra_date. It has stats about tra_date's distribution,
but none about the distribution of "tra_date::date".

regards, tom lane

+


Stay in the know. Pulse on the new Yahoo.com. Check it out. + +--0-1416824215-1157974153=:62851-- + +From pgsql-performance-owner@postgresql.org Mon Sep 11 10:48:20 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id ACB9A9FB38E + for ; + Mon, 11 Sep 2006 10:48:19 -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 76586-05 for + ; + Mon, 11 Sep 2006 10:48:06 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mx00.ext.bfk.de (mx00.ext.bfk.de [217.29.46.125]) + by postgresql.org (Postfix) with ESMTP id B30B99FB228 + for ; + Mon, 11 Sep 2006 10:48:06 -0300 (ADT) +Received: from fweimer by bfk.de with local id 1GMm8p-00050X-NC + for pgsql-performance@postgresql.org; Mon, 11 Sep 2006 15:48:03 +0200 +To: pgsql-performance@postgresql.org +Subject: Abysmal hash join +From: Florian Weimer +Date: Mon, 11 Sep 2006 15:48:03 +0200 +Message-ID: <821wqiy0oc.fsf@mid.bfk.de> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/58 +X-Sequence-Number: 20744 + +Hi, + +for this simple join of two tables, + +SELECT * FROM large_rel n, smaller_rel a + WHERE n.field_1 = a.field_2 AND a.key = '127.0.0.1'; + +PostgreSQL 8.1.4 chooses an extremely bad query plan: + + Hash Join (cost=283.45..8269374.38 rows=14137 width=94) + Hash Cond: ("outer".field_1 = "inner".field_2) + -> Seq Scan on large_rel n (cost=0.00..6760690.04 rows=301651904 width=52) + -> Hash (cost=283.27..283.27 rows=74 width=42) + -> Bitmap Heap Scan on smaller_rel a (cost=2.26..283.27 rows=74 width=42) + Recheck Cond: (key = '127.0.0.1'::inet) + -> Bitmap Index Scan on smaller_rel_1_key (cost=0.00..2.26 rows=74 width=0) + Index Cond: (key = '127.0.0.1'::inet) + +Note the sequential scan over the whole large_rel table (and the +corresponding row estimate is roughly correct). + +If I turn off hash joins, I get this plan, which actually completes in +finite time: + + Nested Loop (cost=2005.35..46955689.59 rows=14137 width=94) (actual time=0.325..0.678 rows=12 loops=1) + -> Bitmap Heap Scan on smaller_rel a (cost=2.26..283.27 rows=74 width=42) (actual time=0.132..0.133 rows=1 loops=1) + Recheck Cond: (key = '127.0.0.1'::inet) + -> Bitmap Index Scan on smaller_rel_1_key (cost=0.00..2.26 rows=74 width=0) (actual time=0.095..0.095 rows=1 loops=1) + Index Cond: (key = '127.0.0.1'::inet) + -> Bitmap Heap Scan on large_rel n (cost=2003.09..632110.78 rows=193739 width=52) (actual time=0.182..0.501 rows=12 loops=1) + Recheck Cond: (n.field_1 = "outer".field_2) + -> Bitmap Index Scan on large_rel_1_field_1 (cost=0.00..2003.09 rows=193739 width=0) (actual time=0.148..0.148 rows=12 loops=1) + Index Cond: (n.field_1 = "outer".field_2) + +The row estimate for + + SELECT * FROM smaller_rel a WHERE a.key = '127.0.0.1'; + +is somewhat off: + + Bitmap Heap Scan on smaller_rel a (cost=2.26..283.27 rows=74 width=42) (actual time=0.134..0.135 rows=1 loops=1) + Recheck Cond: (key = '127.0.0.1'::inet) + -> Bitmap Index Scan on smaller_rel_1_key (cost=0.00..2.26 rows=74 width=0) (actual time=0.108..0.108 rows=1 loops=1) + Index Cond: (key = '127.0.0.1'::inet) + +However, I can't believe that the hash join would be faster even if +there where 74 matching rows in smaller_rel instead of just one. The +estimate decreases when I increase the portion of smaller_rel which is +scanned by ANALYZE (to something like 10% of the table), but this +doesn't look like a solution. + +Any suggestions? + +(The queries have been pseudonzmized and may contain typos.) +-- +Florian Weimer +BFK edv-consulting GmbH http://www.bfk.de/ +Durlacher Allee 47 tel: +49-721-96201-1 +D-76131 Karlsruhe fax: +49-721-96201-99 + +From pgsql-performance-owner@postgresql.org Mon Sep 11 11:22:09 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id 60D3E9FA5EA + for ; + Mon, 11 Sep 2006 11:22:08 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 98460-08 for + ; + Mon, 11 Sep 2006 14:21:45 +0000 (UTC) +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 71F019FA1AD + for ; + Mon, 11 Sep 2006 11:21:45 -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 k8BELhMb022593; + Mon, 11 Sep 2006 10:21:44 -0400 (EDT) +To: fardeen memon +cc: pgsql-performance@postgresql.org +Subject: Re: Performance problem with joins +In-reply-to: <20060911112913.63078.qmail@web60815.mail.yahoo.com> +References: <20060911112913.63078.qmail@web60815.mail.yahoo.com> +Comments: In-reply-to fardeen memon + message dated "Mon, 11 Sep 2006 04:29:13 -0700" +Date: Mon, 11 Sep 2006 10:21:43 -0400 +Message-ID: <22592.1157984503@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Archive-Number: 200609/59 +X-Sequence-Number: 20745 + +fardeen memon writes: +> here is the output of the explain query after changing the tra_date column to timestamp. + +If you want intelligent commentary, please (a) post EXPLAIN ANALYZE not +EXPLAIN output, and (b) don't mangle the indentation. This is just +about unreadable :-( + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Mon Sep 11 11:29:09 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 294459FA5EA + for ; + Mon, 11 Sep 2006 11:29:09 -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 80117-10 for + ; + Mon, 11 Sep 2006 11:28:56 -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 71D259FA1AD + for ; + Mon, 11 Sep 2006 11:28:56 -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 k8BESpMW022642; + Mon, 11 Sep 2006 10:28:51 -0400 (EDT) +To: Florian Weimer +cc: pgsql-performance@postgresql.org +Subject: Re: Abysmal hash join +In-reply-to: <821wqiy0oc.fsf@mid.bfk.de> +References: <821wqiy0oc.fsf@mid.bfk.de> +Comments: In-reply-to Florian Weimer + message dated "Mon, 11 Sep 2006 15:48:03 +0200" +Date: Mon, 11 Sep 2006 10:28:51 -0400 +Message-ID: <22641.1157984931@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.11 tagged_above=0 required=5 tests=AWL, + SPF_HELO_PASS, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/60 +X-Sequence-Number: 20746 + +Florian Weimer writes: +> -> Bitmap Index Scan on large_rel_1_field_1 (cost=0.00..2003.09 rows=193739 width=0) (actual time=0.148..0.148 rows=12 loops=1) +> Index Cond: (n.field_1 = "outer".field_2) + +What you need to look into is why that rowcount estimate is off by four +orders of magnitude. + +The estimate on the smaller table is only off by a factor of 75 but +that's still pretty darn awful. Are the statistics up to date? Maybe +larger stats targets would help. + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Mon Sep 11 12:15:51 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 46B409FB228 + for ; + Mon, 11 Sep 2006 12:15:50 -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 84866-07 for + ; + Mon, 11 Sep 2006 12:15:36 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mx00.ext.bfk.de (mx00.ext.bfk.de [217.29.46.125]) + by postgresql.org (Postfix) with ESMTP id E5E029FB3A3 + for ; + Mon, 11 Sep 2006 12:15:36 -0300 (ADT) +Received: from fweimer by bfk.de with local id 1GMnVW-0006tj-4B; + Mon, 11 Sep 2006 17:15:34 +0200 +To: Tom Lane +Cc: pgsql-performance@postgresql.org +Subject: Re: Abysmal hash join +References: <821wqiy0oc.fsf@mid.bfk.de> <22641.1157984931@sss.pgh.pa.us> +From: Florian Weimer +Date: Mon, 11 Sep 2006 17:15:33 +0200 +In-Reply-To: <22641.1157984931@sss.pgh.pa.us> (Tom Lane's message of "Mon, + 11 Sep 2006 10:28:51 -0400") +Message-ID: <82wt8awi21.fsf@mid.bfk.de> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/61 +X-Sequence-Number: 20747 + +* Tom Lane: + +> Florian Weimer writes: +>> -> Bitmap Index Scan on large_rel_1_field_1 (cost=0.00..2003.09 rows=193739 width=0) (actual time=0.148..0.148 rows=12 loops=1) +>> Index Cond: (n.field_1 = "outer".field_2) +> +> What you need to look into is why that rowcount estimate is off by four +> orders of magnitude. + +Ah, thanks. + +> The estimate on the smaller table is only off by a factor of 75 but +> that's still pretty darn awful. Are the statistics up to date? + +Seems so. Running ANALYZE only increased the row estimate, instead of +decreasing it. 8-( + +> Maybe larger stats targets would help. + +I've set default_statistics_target to 100 and rerun ANALYZE on that +table. The estimate went down to 43108 (and the hash join is still +the preferred plan). ANALZE with default_statistics_target = 200 +(which seems pretty large to me) is down to 26050 and the bitmap scan +plan is chosen. + +PostgreSQL seems to think that there are only very few distinct values +for that column (with default_statistics_target = 100 and 200): + +EXPLAIN SELECT DISTINCT field_1 FROM large_rel; + + Unique (cost=82841534.37..84400982.21 rows=7235 width=24) + -> Sort (cost=82841534.37..83621258.29 rows=311889568 width=24) + Sort Key: field_1 + -> Seq Scan on large_rel (cost=0.00..6863066.68 rows=311889568 width=24) + + Unique (cost=82733282.28..84290654.92 rows=11957 width=24) + -> Sort (cost=82733282.28..83511968.60 rows=311474528 width=24) + Sort Key: field_1 + -> Seq Scan on large_rel (cost=0.00..6858916.28 rows=311474528 width=24) + +I don't know the exact value, but it's closer to a few millions. The +distribution is quite odd. A large sample of the column (10 million +rows) looks like this: + +SELECT cnt, COUNT(*) FROM + (SELECT COUNT(*) AS cnt FROM + (SELECT field_1 FROM large_rel LIMIT 10000000) x GROUP BY field_1) y + GROUP BY cnt ORDER BY cnt; + + cnt | count +--------+-------- + 1 | 258724 + 2 | 85685 + 3 | 46215 + 4 | 29333 + 5 | 20512 + 6 | 15276 + 7 | 11444 + 8 | 9021 +[...] + 59379 | 1 + 59850 | 1 + 111514 | 1 + 111783 | 1 + 111854 | 1 + 112259 | 1 + 112377 | 1 + 116379 | 1 + 116473 | 1 + 116681 | 1 + +Maybe I'm just screwed with such a distribution, but it's still rather +unfortunate. + +-- +Florian Weimer +BFK edv-consulting GmbH http://www.bfk.de/ +Durlacher Allee 47 tel: +49-721-96201-1 +D-76131 Karlsruhe fax: +49-721-96201-99 + +From pgsql-performance-owner@postgresql.org Mon Sep 11 12:40:18 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 7FF1A9FB392 + for ; + Mon, 11 Sep 2006 12:40:17 -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 84491-10 for + ; + Mon, 11 Sep 2006 12:40:01 -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 229579FB39A + for ; + Mon, 11 Sep 2006 12:40:01 -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 k8BFdw9C003205; + Mon, 11 Sep 2006 11:39:58 -0400 (EDT) +To: Florian Weimer +cc: pgsql-performance@postgresql.org +Subject: Re: Abysmal hash join +In-reply-to: <82wt8awi21.fsf@mid.bfk.de> +References: <821wqiy0oc.fsf@mid.bfk.de> <22641.1157984931@sss.pgh.pa.us> + <82wt8awi21.fsf@mid.bfk.de> +Comments: In-reply-to Florian Weimer + message dated "Mon, 11 Sep 2006 17:15:33 +0200" +Date: Mon, 11 Sep 2006 11:39:58 -0400 +Message-ID: <3204.1157989198@sss.pgh.pa.us> +From: Tom Lane +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.11 tagged_above=0 required=5 tests=AWL, + SPF_HELO_PASS, SPF_PASS +X-Spam-Level: +X-Archive-Number: 200609/62 +X-Sequence-Number: 20748 + +Florian Weimer writes: +>> Maybe larger stats targets would help. + +> I've set default_statistics_target to 100 and rerun ANALYZE on that +> table. The estimate went down to 43108 (and the hash join is still +> the preferred plan). ANALZE with default_statistics_target = 200 +> (which seems pretty large to me) is down to 26050 and the bitmap scan +> plan is chosen. + +> PostgreSQL seems to think that there are only very few distinct values +> for that column (with default_statistics_target = 100 and 200): + +Yeah, n_distinct estimation from a sample is inherently hard :-(. Given +that you have such a long tail on the distribution, it might be worth +your while to crank the stats target for that column all the way to the +maximum (1000). Also you need to experiment with extending the stats +for the smaller table. + +I believe what's happening here is that the smaller table joins only to +less-frequent entries in the big table (correct?). The hash join would +be appropriate if there were many rows joining to the very-frequent +entries, and the problem for the planner is to determine that that's not +so. Given enough stats on the two joining columns, it should be able to +determine that. + +Of course, large stats targets will slow down planning to some extent, +so you should also keep an eye on how long it takes to plan the query. + + regards, tom lane + +From pgsql-performance-owner@postgresql.org Mon Sep 11 12:50:45 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id A523D9FB318 + for ; + Mon, 11 Sep 2006 12:50:44 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 26869-10 for + ; + Mon, 11 Sep 2006 15:50:36 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mail.clickspace.com (router2.clickspace.com [65.110.166.227]) + by postgresql.org (Postfix) with ESMTP id E422E9FB392 + for ; + Mon, 11 Sep 2006 12:50:35 -0300 (ADT) +Received: from localhost ([127.0.0.1]) by mail.clickspace.com + (using TLSv1/SSLv3 with cipher RC4-SHA (128 bits)); + Mon, 11 Sep 2006 09:50:32 -0600 +In-Reply-To: +References: +Mime-Version: 1.0 (Apple Message framework v752.2) +Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed +Message-Id: +Cc: pgsql-performance@postgresql.org +Content-Transfer-Encoding: 7bit +From: Brian Wipf +Subject: Re: Configuring System for Speed +Date: Mon, 11 Sep 2006 09:50:43 -0600 +To: Luke Lonergan +X-Mailer: Apple Mail (2.752.2) +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= +X-Spam-Level: +X-Archive-Number: 200609/63 +X-Sequence-Number: 20749 + + +On 8-Sep-06, at 2:44 AM, Luke Lonergan wrote: + +> One modification: we implemented two internal 60GB laptop hard +> drives with +> an additional 3Ware 8006-2LP controller on each machine for the OS. +> This +> frees up all 16 SATA II drives for data. + +That's a great idea. One question though. If I put all 16 drives in a +RAID 10 for the database, where should I put the logs? On that large +RAID set? If I use a RAID controller with a BB cache for the mirrored +laptop drives, might I be able to use that for the logs and OS? + +Brian Wipf + + +From pgsql-performance-owner@postgresql.org Mon Sep 11 13:29:03 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id C1E1A9FB213 + for ; + Mon, 11 Sep 2006 13:29:02 -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 98500-05 for + ; + Mon, 11 Sep 2006 13:28:50 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from mx00.ext.bfk.de (mx00.ext.bfk.de [217.29.46.125]) + by postgresql.org (Postfix) with ESMTP id 5CC929FA4C5 + for ; + Mon, 11 Sep 2006 13:28:51 -0300 (ADT) +Received: from fweimer by bfk.de with local id 1GMoeP-0007BV-Dy; + Mon, 11 Sep 2006 18:28:49 +0200 +To: Tom Lane +Cc: pgsql-performance@postgresql.org +Subject: Re: Abysmal hash join +References: <821wqiy0oc.fsf@mid.bfk.de> <22641.1157984931@sss.pgh.pa.us> + <82wt8awi21.fsf@mid.bfk.de> <3204.1157989198@sss.pgh.pa.us> +From: Florian Weimer +Date: Mon, 11 Sep 2006 18:28:49 +0200 +In-Reply-To: <3204.1157989198@sss.pgh.pa.us> (Tom Lane's message of "Mon, + 11 Sep 2006 11:39:58 -0400") +Message-ID: <82sliyweny.fsf@mid.bfk.de> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/64 +X-Sequence-Number: 20750 + +* Tom Lane: + +> Yeah, n_distinct estimation from a sample is inherently hard :-(. Given +> that you have such a long tail on the distribution, it might be worth +> your while to crank the stats target for that column all the way to the +> maximum (1000). + +I've done that. Fortunately, ANALYZE time didn't increase by that +much, compared to the default (by just a factor of 10). The bitmap +scan estimate is still way off (around 8000), but let's hope that it +won't matter in practice. + +> Also you need to experiment with extending the stats for the smaller +> table. + +Yeah, the situation is quite similar, but on a much smaller scale. + +> I believe what's happening here is that the smaller table joins only to +> less-frequent entries in the big table (correct?). + +Almost. We won't select the rows based on these values, at least not +in queries of that type. The reason is simply that the result set is +too large to be useful. + +> Of course, large stats targets will slow down planning to some extent, +> so you should also keep an eye on how long it takes to plan the query. + +These queries are mostly ad-hoc, so a delay of a couple of seconds +doesn't matter. Only if you need to wait five minutes, it's a +different story. + +It seems that the situation is under control now. Thanks. + +-- +Florian Weimer +BFK edv-consulting GmbH http://www.bfk.de/ +Durlacher Allee 47 tel: +49-721-96201-1 +D-76131 Karlsruhe fax: +49-721-96201-99 + +From pgsql-performance-owner@postgresql.org Mon Sep 11 15:50:17 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 9F3B39FB3F4 + for ; + Mon, 11 Sep 2006 15:50:14 -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 08674-04 for + ; + Mon, 11 Sep 2006 15:50:03 -0300 (ADT) +X-Greylist: delayed 00:35:37.364273 by SQLgrey- +Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) + by postgresql.org (Postfix) with ESMTP id 1F48A9FB38C + for ; + Mon, 11 Sep 2006 15:50:02 -0300 (ADT) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 +Received: from fanzine.igalia.com (fanzine.igalia.com [213.172.36.226]) + by svr4.postgresql.org (Postfix) with ESMTP id 54FF45AFA16 + for ; + Mon, 11 Sep 2006 18:14:22 +0000 (GMT) +Received: from maestria.local.igalia.com + ([192.168.10.14] helo=mail.igalia.com ident=mail) + by fanzine.igalia.com with esmtp + (Cipher TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim) id 1GMqIU-0007UN-00 + for ; Mon, 11 Sep 2006 20:14:18 +0200 +Received: from codfix.local.igalia.com ([192.168.10.40] ident=mail) + by mail.igalia.com with esmtp + (Cipher TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim) id 1GMqIT-0003Fm-00 + for ; Mon, 11 Sep 2006 20:14:17 +0200 +Received: from apinheiro by codfix.local.igalia.com with local (Exim) + id 1GMqIS-0002N8-00 + for ; Mon, 11 Sep 2006 20:14:16 +0200 +Subject: Performance problem with Sarge compared with Woody +From: =?ISO-8859-1?Q?Pi=F1eiro?= +To: pgsql-performance@postgresql.org +Content-Type: text/plain; charset=ISO-8859-15 +Content-Transfer-Encoding: quoted-printable +Date: Mon, 11 Sep 2006 20:14:13 +0200 +Message-Id: <1157998456.7540.15.camel@codfix.local.igalia.com> +Mime-Version: 1.0 +X-Mailer: Evolution 2.0.4 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=1.069 tagged_above=0 required=5 tests=SPF_NEUTRAL +X-Spam-Level: * +X-Archive-Number: 200609/65 +X-Sequence-Number: 20751 + +Hi, + +a week ago we migrate a Woody(postgre 7.2.1) server to Sarge(postgre +7.4.7). To migrate the database we use a dump, using pg_dump with this +options: +pg_dump -U -c -F p -O -v -f + +We have a search, that using woody take about 1-2 minutes, but with +sarge it is executing about 2 hours, and at least it crashes, with a +message about a temporal file and no more disk space ( i have more than +a GB of free disk space). + +The search is very long, with a lot of joins (generated by a ERP we +manage). We think that the problem can be at the indices, but we are not +sure. At the original woody database we create indices, but when the +dump is being installed at sarge, it creates an implicit index, so there +are times that there are duplicates indices. But we try to remove the +duplicate indices and we don't resove the problem. + +The select is the next one (sorry if it is too big): + +(SELECT facturaabono.numeroFactura as=20 +numeroFacturaFactura,facturaabono.codigoFactura as=20 +codigoFacturaFactura,facturaabono.codigoEmpresa as=20 +codigoEmpresaFactura,facturaabono.codigoTienda as=20 +codigoTiendaFactura,facturaabono.estado as=20 +estadoFactura,facturaabono.fechaemision as=20 +fechaEmisionFactura,facturaabono.tipoIva as=20 +tipoIvaFactura,facturaAbono.baseImponibleModificada as=20 +baseImponibleModificadaFactura,to_char(facturaAbono.baseImponibleNueva,'999= +99999D99')=20 +as baseImponibleNuevaFactura,refactura as=20 +refacturaFactura,participanteShop.codigoParty as=20 +codigoPartyParticipantShop,participanteShop.nombre as=20 +nombreParticipantShop,participanteCliente.codigoParty as=20 +codigoPartyParticipantPagador,participanteCliente.nick as=20 +nickParticipantPagador,participanteCliente.nombreCorto as=20 +shortnameparticipantPagador,participanteCliente.cif as=20 +cifParticipantPagador,reparacion.codigoReparacion as=20 +codigoReparacionRepair,reparacion.codigoTienda as=20 +codigoTiendaRepair,reparacion.codigoCliente as=20 +codigoClienteRepair,reparacion.codigoCompania as=20 +codigoCompaniaRepair,tienda.codigoAutoArte as codigoAutoarteShop,=20 +facturaAbono.codigoEmpresa as=20 +codigoPartyParticipantEnter,participanteCompany.nombre as=20 +nombreParticipantCompany,participanteCompany.nombreCorto as=20 +shortnameparticipantCompany,participanteCompany.codigoParty as=20 +codigoPartyParticipantCompany,participanteCompany.cif as=20 +cifParticipantCompany, pago.codigoPago as codigoPagoPago,=20 +pago.codigobanco as codigoBancoPago, pago.codigooficina as=20 +codigoOficinaPago, pago.numerocuenta as numeroCuentaPago, +pago.esAPlazos=20 +as esAPlazosPago, pago.pagosRealizados as pagosRealizadosPago,=20 +pago.numeroVencimientos as numeroVencimientosPago, pago.fechaInicio as=20 +fechaInicioPago, pago.esdomiciliacion as esdomiciliacionpago from=20 +reparacion left outer join participante participanteCompany ON=20 +(reparacion.codigoCompania=3DparticipanteCompany.codigoParty) left outer=20 +join siniestro on=20 +(siniestro.codigoReparacion=3Dreparacion.codigoReparacion and=20 +siniestro.codigoTienda=3Dreparacion.codigoTienda and=20 +siniestro.codigoEmpresa=3Dreparacion.codigoEmpresa), participante=20 +participanteCliente, participante participanteShop, tienda, +facturaabono=20 +left outer join pago on (facturaabono.codigoPago=3Dpago.codigoPago and=20 +facturaabono.codigoTienda=3Dpago.codigoTienda and=20 +facturaabono.codigoEmpresa=3Dpago.codigoEmpresa) where=20 +facturaabono.estado >=3D 0 and (facturaabono.numeroFactura is not null) =20 +and facturaabono.codigoTienda=3DparticipanteShop.codigoParty and=20 +facturaabono.codigoTienda=3Dreparacion.codigoTienda and=20 +facturaabono.codigoEmpresa=3Dreparacion.codigoEmpresa and=20 +facturaabono.codigoPagador =3D participanteCliente.codigoParty and=20 +tienda.codigoTienda =3D facturaabono.codigoTienda and=20 +(participanteCliente.nick ilike '%ASITUR%') and=20 +(facturaabono.fechaEmision<=3D'Thu Sep 7 00:00:00 2006 +') and (facturaabono.fechaEmision>=3D'Sun Aug 7 00:00:00 2005 +') and facturaabono.tipoIva is NULL and (facturaabono.codigoReparacion=20 +=3D reparacion.codigoReparacion) order by=20 +participantecompany.nombre,facturaabono.numeroFactura) union (SELECT=20 +DISTINCT facturaabono.numeroFactura as=20 +numeroFacturaFactura,facturaabono.codigoFactura as=20 +codigoFacturaFactura,facturaabono.codigoEmpresa as=20 +codigoEmpresaFactura,facturaabono.codigoTienda as=20 +codigoTiendaFactura,facturaabono.estado as=20 +estadoFactura,albaranes.fechaemision as=20 +fechaEmisionFactura,facturaabono.tipoIva as=20 +tipoIvaFactura,facturaAbono.baseImponibleModificada as=20 +baseImponibleModificadaFactura,to_char(facturaAbono.baseImponibleNueva,'999= +99999D99')=20 +as baseImponibleNuevaFactura,refactura as=20 +refacturaFactura,participanteShop.codigoParty as=20 +codigoPartyParticipantShop,participanteShop.nombre as=20 +nombreParticipantShop,participanteCliente.codigoParty as=20 +codigoPartyParticipantPagador,participanteCliente.nick as=20 +nickParticipantPagador,participanteCliente.nombreCorto as=20 +shortnameparticipantPagador,participanteCliente.cif as=20 +cifParticipantPagador,(case WHEN reparacion.codigoCompania is not NULL=20 +THEN reparacion.codigoReparacion ELSE NULL END) as=20 +codigoReparacionRepair,reparacion.codigoTienda as=20 +codigoTiendaRepair,reparacion.codigoCliente as=20 +codigoClienteRepair,reparacion.codigoCompania as=20 +codigoCompaniaRepair,tienda.codigoAutoArte as codigoAutoarteShop,=20 +facturaAbono.codigoEmpresa as=20 +codigoPartyParticipantEnter,participanteCompany.nombre as=20 +nombreParticipantCompany,participanteCompany.nombreCorto as=20 +shortnameparticipantCompany,participanteCompany.codigoParty as=20 +codigoPartyParticipantCompany,participanteCompany.cif as=20 +cifParticipantCompany, pago.codigoPago as codigoPagoPago,=20 +pago.codigobanco as codigoBancoPago, pago.codigooficina as=20 +codigoOficinaPago, pago.numerocuenta as numeroCuentaPago, +pago.esAPlazos=20 +as esAPlazosPago, pago.pagosRealizados as pagosRealizadosPago,=20 +pago.numeroVencimientos as numeroVecimientosPago, pago.fechaInicio as=20 +fechaInicioPago, pago.esdomiciliacion as esdomiciliacionpago from=20 +reparacion left outer join participante participanteCompany ON=20 +(reparacion.codigoCompania=3DparticipanteCompany.codigoParty) left outer=20 +join siniestro on=20 +(siniestro.codigoReparacion=3Dreparacion.codigoReparacion and=20 +siniestro.codigoTienda=3Dreparacion.codigoTienda and=20 +siniestro.codigoEmpresa=3Dreparacion.codigoEmpresa), participante=20 +participanteCliente, participante participanteShop, tienda, +facturaabono=20 +left outer join pago on (facturaabono.codigoPago=3Dpago.codigoPago and=20 +facturaabono.codigoTienda=3Dpago.codigoTienda and=20 +facturaabono.codigoEmpresa=3Dpago.codigoEmpresa), (select=20 +a.codigofactura,a.fechaemision,=20 +albaranabono.codigoReparacion,a.codigoTienda,a.codigoEmpresa from=20 +albaranabono,facturaabono a where=20 +albaranabono.numeroFactura=3Da.codigoFactura and=20 +a.codigoEmpresa=3DalbaranAbono.codigoEmpresa and=20 +a.codigoTienda=3Dalbaranabono.codigoTienda) as albaranes where=20 +facturaabono.estado >=3D 0 and (facturaabono.numeroFactura is not null) =20 +and facturaabono.codigoTienda=3DparticipanteShop.codigoParty and=20 +facturaabono.codigoPagador =3D participanteCliente.codigoParty and=20 +tienda.codigoTienda =3D facturaabono.codigoTienda and=20 +(albaranes.codigoFactura =3D facturaAbono.codigoFactura) and=20 +(albaranes.codigoEmpresa =3D facturaAbono.codigoEmpresa) and=20 +(albaranes.codigoTienda =3D facturaAbono.codigoTienda) and=20 +(albaranes.codigoReparacion=3Dreparacion.codigoReparacion) and=20 +(albaranes.codigoTienda=3Dreparacion.codigoTienda) and=20 +(albaranes.codigoEmpresa=3Dreparacion.codigoEmpresa) and=20 +(participanteCliente.nick ilike '%ASITUR%') and=20 +(facturaabono.fechaEmision<=3D'Thu Sep 7 00:00:00 2006 +') and (facturaabono.fechaEmision>=3D'Sun Aug 7 00:00:00 2005 +') and facturaabono.tipoIva is NULL order by=20 +participantecompany.nombre,facturaabono.numeroFactura) union (SELECT=20 +facturaabono.numeroFactura as=20 +numeroFacturaFactura,facturaabono.codigoFactura as=20 +codigoFacturaFactura,facturaabono.codigoEmpresa as=20 +codigoEmpresaFactura,facturaabono.codigoTienda as=20 +codigoTiendaFactura,facturaabono.estado as=20 +estadoFactura,facturaabono.fechaemision as=20 +fechaEmisionFactura,facturaabono.tipoIva as=20 +tipoIvaFactura,facturaAbono.baseImponibleModificada as=20 +baseImponibleModificadaFactura,to_char(facturaAbono.baseImponibleNueva,'999= +99999D99')=20 +as baseImponibleNuevaFactura,refactura as=20 +refacturaFactura,participanteShop.codigoParty as=20 +codigoPartyParticipantShop,participanteShop.nombre as=20 +nombreParticipantShop,participanteCliente.codigoParty as=20 +codigoPartyParticipantPagador,participanteCliente.nick as=20 +nickParticipantPagador,participanteCliente.nombreCorto as=20 +shortnameparticipantPagador,participanteCliente.cif as=20 +cifParticipantPagador,NULL as=20 +codigoReparacionRepair,reparacion.codigoTienda as=20 +codigoTiendaRepair,NULL as codigoClienteRepair,NULL as=20 +codigoCompaniaRepair,tienda.codigoAutoArte as codigoAutoarteShop,=20 +facturaAbono.codigoEmpresa as codigoPartyParticipantEnter,NULL as=20 +nombreParticipantCompany,NULL as shortnameparticipantCompany,NULL as=20 +codigoPartyParticipantCompany,NULL as cifParticipantCompany,=20 +pago.codigoPago as codigoPagoPago, pago.codigobanco as codigoBancoPago,=20 +pago.codigooficina as codigoOficinaPago, pago.numerocuenta as=20 +numeroCuentaPago, pago.esAPlazos as esAPlazosPago, pago.pagosRealizados=20 +as pagosRealizadosPago, pago.numeroVencimientos as=20 +numeroVecimientosPago, pago.fechaInicio as fechaInicioPago,=20 +pago.esdomiciliacion as esdomiciliacionpago from reparacion left outer=20 +join participante participanteCompany ON=20 +(reparacion.codigoCompania=3DparticipanteCompany.codigoParty) left outer=20 +join siniestro on=20 +(siniestro.codigoReparacion=3Dreparacion.codigoReparacion and=20 +siniestro.codigoTienda=3Dreparacion.codigoTienda and=20 +siniestro.codigoEmpresa=3Dreparacion.codigoEmpresa), participante=20 +participanteCliente, participante participanteShop, tienda, +facturaabono=20 +left outer join pago on (facturaabono.codigoPago=3Dpago.codigoPago and=20 +facturaabono.codigoTienda=3Dpago.codigoTienda and=20 +facturaabono.codigoEmpresa=3Dpago.codigoEmpresa), (select distinct=20 +facturaabono.codigofactura as=20 +numeroFacturaFactura,facturaabono.codigoPago,albaranabono.numeroFactura, =20 +codigoreparacionTaller,facturatalleres.codigoEmpresaAlbaran as=20 +codigoEMpresaAlbaranTaller,facturatalleres.codigoTiendaAlbaran as=20 +codigoTiendaAlbaranTaller from facturaabono left outer join=20 +albaranabono on (facturaabono.codigoFactura=3Dalbaranabono.numeroFactura=20 +and (facturaabono.codigoTienda=3Dalbaranabono.codigoTienda) and=20 +(facturaabono.codigoEMpresa=3DalbaranAbono.codigoEmpresa)), (select=20 +codigoReparacion as codigoReparacionTaller,numeroFacturaTaller as=20 +numeroFacturaTaller =20 +,codigoEmpresaFactura,codigoTiendaFactura,codigoEmpresaAlbaran,codigoTienda= +Albaran =20 +from facturataller,albaranabono where=20 +albaranabono.numeroAlbaran=3DfacturaTaller.numeroalbaran and=20 +albaranabono.codigoTienda=3Dfacturataller.codigoTiendaAlbaran and=20 +albaranabono.codigoEmpresa=3DfacturaTaller.codigoEmpresaAlbaran ) as=20 +facturaTalleres where albaranabono.numeroFactura is null and =20 +facturaabono.codigoFactura=3DnumeroFacturaTaller and=20 +facturaabono.codigoTienda=3DfacturaTalleres.codigoTiendaFactura and=20 +facturaabono.codigoEmpresa=3DfacturaTalleres.codigoEmpresaFactura ) as=20 +facturasTalleres where facturaabono.estado >=3D 0 and=20 +(facturaabono.numeroFactura is not null) and=20 +facturaabono.codigoTienda=3DparticipanteShop.codigoParty and=20 +facturaabono.codigoTienda=3Dreparacion.codigoTienda and=20 +facturaabono.codigoEmpresa=3Dreparacion.codigoEmpresa and=20 +facturaabono.codigoPagador =3D participanteCliente.codigoParty and=20 +tienda.codigoTienda =3D facturaabono.codigoTienda and=20 +(participanteCliente.nick ilike '%ASITUR%') and=20 +(facturaabono.fechaEmision<=3D'Thu Sep 7 00:00:00 2006 +') and (facturaabono.fechaEmision>=3D'Sun Aug 7 00:00:00 2005 +') and facturaabono.tipoIva is NULL and=20 +facturaabono.codigoFactura=3DfacturasTalleres.numeroFacturaFactura and =20 +reparacion.codigoReparacion=3DfacturasTalleres.codigoReparacionTaller +and =20 +reparacion.codigoTienda =3D facturasTalleres.codigoTiendaAlbaranTaller +and =20 +reparacion.codigoEmpresa =3D facturasTalleres.codigoEmpresaAlbaranTaller=20 +group by facturaabono.codigoFactura,=20 +facturaabono.numeroFactura,facturaabono.codigoempresa,=20 +facturaabono.codigotienda, facturaabono.estado,=20 +facturaabono.fechaemision,=20 +facturaabono.tipoIva,facturaabono.baseimponiblemodificada,facturaabono.base= +imponiblenueva,=20 +facturaabono.refactura,participanteshop.codigoparty,=20 +participanteshop.nombre,=20 +participantecliente.codigoparty,participantecliente.nick,participanteClient= +e.nombreCorto,participantecompany.nombre,participantecliente.cif,reparacion= +.codigotienda,tienda.codigoautoarte,pago.codigopago=20 +,pago.codigobanco, pago.codigooficina, pago.numerocuenta,=20 +pago.esAPlazos,pago.pagosRealizados,pago.numeroVencimientos,pago.fechainici= +o,=20 +pago.esdomiciliacion order by=20 +participantecompany.nombre,facturaabono.numeroFactura); + + + +Any idea ? + +--=20 +Pi=F1eiro + +From pgsql-performance-owner@postgresql.org Mon Sep 11 16:02:32 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id 624EE9FB267 + for ; + Mon, 11 Sep 2006 16:02:32 -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 07366-10 for + ; + Mon, 11 Sep 2006 16:02:21 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from globalrelay.com (mail1.globalrelay.com [216.18.71.77]) + by postgresql.org (Postfix) with ESMTP id 936AA9FA304 + for ; + Mon, 11 Sep 2006 16:02:21 -0300 (ADT) +X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway +X-GR-Acctd: YES +Received: from [67.90.96.2] (HELO DaveEMachine) + by globalrelay.com (CommuniGate Pro SMTP 4.2.3) + with ESMTP id 104764119; Mon, 11 Sep 2006 12:02:18 -0700 +From: "Dave Dutcher" +To: =?iso-8859-1?Q?'Pi=F1eiro'?= , + +Subject: Re: Performance problem with Sarge compared with Woody +Date: Mon, 11 Sep 2006 14:02:17 -0500 +Message-ID: <002801c6d5d4$cd869490$8300a8c0@tridecap.com> +MIME-Version: 1.0 +Content-Type: text/plain; + charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable +X-Priority: 3 (Normal) +X-MSMail-Priority: Normal +X-Mailer: Microsoft Outlook, Build 10.0.6626 +X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 +In-Reply-To: <1157998456.7540.15.camel@codfix.local.igalia.com> +Importance: Normal +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.168 tagged_above=0 required=5 tests=AWL +X-Spam-Level: +X-Archive-Number: 200609/66 +X-Sequence-Number: 20752 + +> -----Original Message----- +> From: pgsql-performance-owner@postgresql.org=20 +> [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Pi=F1eiro +> Subject: [PERFORM] Performance problem with Sarge compared with Woody + +> a week ago we migrate a Woody(postgre 7.2.1) server to Sarge(postgre +> 7.4.7). To migrate the database we use a dump, using pg_dump with this +> options: +> pg_dump -U -c -F p -O -v -f +>=20 +> We have a search, that using woody take about 1-2 minutes, but with +> sarge it is executing about 2 hours, and at least it crashes, with a +> message about a temporal file and no more disk space ( i have=20 +> more than +> a GB of free disk space). +>=20 +> Any idea ? + +The first question is did you run ANALYZE on the new database after +importing your data? =20 + + +From pgsql-performance-owner@postgresql.org Mon Sep 11 16:12:32 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (mx1.hub.org [200.46.208.251]) + by postgresql.org (Postfix) with ESMTP id A07929FA304 + for ; + Mon, 11 Sep 2006 16:12:30 -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 20592-03-7 + for ; + Mon, 11 Sep 2006 16:12:16 -0300 (ADT) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) + by postgresql.org (Postfix) with ESMTP id 247D49FB3E2 + for ; + Mon, 11 Sep 2006 16:12:03 -0300 (ADT) +Received: from [209.162.219.253] (helo=dogma.v10.wvs) + by servata.com with esmtpa (Exim 4.50) + id 1GMrC7-0001jt-Qr; Mon, 11 Sep 2006 12:11:48 -0700 +Subject: Re: Performance problem with Sarge compared with Woody +From: Jeff Davis +To: =?ISO-8859-1?Q?Pi=F1eiro?= +Cc: pgsql-performance@postgresql.org +In-Reply-To: <1157998456.7540.15.camel@codfix.local.igalia.com> +References: <1157998456.7540.15.camel@codfix.local.igalia.com> +Content-Type: text/plain; charset=utf-8 +Date: Mon, 11 Sep 2006 12:11:49 -0700 +Message-Id: <1158001909.29889.33.camel@dogma.v10.wvs> +Mime-Version: 1.0 +X-Mailer: Evolution 2.0.4 (2.0.4-7) +Content-Transfer-Encoding: quoted-printable +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0.24 tagged_above=0 required=5 tests=AWL, + FORGED_RCVD_HELO, SPF_HELO_PASS +X-Spam-Level: +X-Archive-Number: 200609/67 +X-Sequence-Number: 20753 + +On Mon, 2006-09-11 at 20:14 +0200, Pi=C3=B1eiro wrote: +> Hi, +>=20 +> a week ago we migrate a Woody(postgre 7.2.1) server to Sarge(postgre +> 7.4.7). To migrate the database we use a dump, using pg_dump with this +> options: +> pg_dump -U -c -F p -O -v -f +>=20 +> We have a search, that using woody take about 1-2 minutes, but with +> sarge it is executing about 2 hours, and at least it crashes, with a +> message about a temporal file and no more disk space ( i have more than +> a GB of free disk space). +>=20 + +It sounds to me like it's choosing a bad sort plan, and unable to write +enough temporary disk files. + +A likely cause is that you did not "vacuum analyze" after you loaded the +data. Try running that command and see if it helps. If not, can you +provide the output of "explain" and "explain analyze" on both the old +database and the new? + +Also, I suggest that you upgrade to 8.1. 7.4 is quite old, and many +improvements have been made since then. + +Regards, + Jeff Davis + + + + + +From pgsql-performance-owner@postgresql.org Mon Sep 11 19:03:55 2006 +X-Original-To: pgsql-performance-postgresql.org@postgresql.org +Received: from localhost (wm.hub.org [200.46.204.128]) + by postgresql.org (Postfix) with ESMTP id CBBDB9FA231 + for ; + Mon, 11 Sep 2006 19:03:52 -0300 (ADT) +Received: from postgresql.org ([200.46.204.71]) + by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) + with ESMTP id 85820-07 for + ; + Mon, 11 Sep 2006 22:03:44 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey- +Received: from exchange.g2switchworks.com (mail.g2switchworks.com + [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 17BF69F9F79 + for ; + Mon, 11 Sep 2006 19:03:43 -0300 (ADT) +Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com + ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; + Mon, 11 Sep 2006 22:03:42 +0000 +Received: from state.g2switchworks.com by mail.g2switchworks.com; + 11 Sep 2006 17:03:41 -0500 +Subject: Re: Performance problem with Sarge compared with Woody +From: Scott Marlowe +To: =?ISO-8859-1?Q?Pi=F1eiro?= +Cc: pgsql-performance@postgresql.org +In-Reply-To: <1157998456.7540.15.camel@codfix.local.igalia.com> +References: <1157998456.7540.15.camel@codfix.local.igalia.com> +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +Message-Id: <1158012220.1854.10.camel@state.g2switchworks.com> +Mime-Version: 1.0 +X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) +Date: Mon, 11 Sep 2006 17:03:41 -0500 +X-Virus-Scanned: Maia Mailguard 1.0.1 +X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=SPF_PASS, + UNPARSEABLE_RELAY +X-Spam-Level: +X-Archive-Number: 200609/68 +X-Sequence-Number: 20754 + +On Mon, 2006-09-11 at 13:14, Pi=C3=B1eiro wrote: +> Hi, +>=20 +> a week ago we migrate a Woody(postgre 7.2.1) server to Sarge(postgre +> 7.4.7). To migrate the database we use a dump, using pg_dump with this +> options: +> pg_dump -U -c -F p -O -v -f +>=20 +> We have a search, that using woody take about 1-2 minutes, but with +> sarge it is executing about 2 hours, and at least it crashes, with a +> message about a temporal file and no more disk space ( i have more than +> a GB of free disk space). +>=20 +> The search is very long, with a lot of joins (generated by a ERP we +> manage). We think that the problem can be at the indices, but we are not +> sure. At the original woody database we create indices, but when the +> dump is being installed at sarge, it creates an implicit index, so there +> are times that there are duplicates indices. But we try to remove the +> duplicate indices and we don't resove the problem. + +That query made my head hurt. However, reading as much of it as I could +make myself, it seemed to have the common problem where it has lots of +tables in the middle of the joins, i.e. + +select