| From pgsql-performance-owner@postgresql.org Tue Sep 10 02:40:47 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 6DA40475C8B |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 02:40:46 -0400 (EDT) |
| Received: from ns1.officenet.no (ns1.officenet.no [193.212.174.3]) |
| by postgresql.org (Postfix) with ESMTP id B8F35475C45 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 02:40:45 -0400 (EDT) |
| Received: from [193.212.174.117] (helo=jeb.officenet.no) |
| by ns1.officenet.no with esmtp (Exim 3.36 |
| for pgsql-performance@postgresql.org; Tue, 10 Sep 2002 08:40:44 +0200 |
| Content-Type: text/plain; |
| charset="us-ascii" |
| From: Andreas Joseph Krogh <andreak@officenet.no> |
| Organization: OfficeNet AS |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| Date: Tue, 10 Sep 2002 08:40:44 +0200 |
| User-Agent: KMail/1.4.3 |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: quoted-printable |
| Message-Id: <200209100840.44400.andreak@officenet.no> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1 |
| X-Sequence-Number: 1 |
|
|
|
|
|
|
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 10 08:31:09 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 7769A4761AF |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 08:31:08 -0400 (EDT) |
| Received: from dune.aardvarkmedia.co.uk (unknown [195.224.39.132]) |
| by postgresql.org (Postfix) with ESMTP id 97E5B476092 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 08:31:07 -0400 (EDT) |
| Received: from [192.168.168.13] (helo=Gavin) |
| by dune.aardvarkmedia.co.uk with smtp (Exim 3.33 |
| id 17okAe-0006ek-00 |
| for pgsql-performance@postgresql.org; Tue, 10 Sep 2002 13:31:08 +0100 |
| From: "Gavin Love" <gavin@aardvarkmedia.co.uk> |
| To: <pgsql-performance@postgresql.org> |
| Subject: subscribe |
| Date: Tue, 10 Sep 2002 13:31:10 +0100 |
| Message-ID: <GBELKBAKEIGPAOOFCLJJMEDKEDAA.gavin@aardvarkmedia.co.uk> |
| MIME-Version: 1.0 |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| Content-Transfer-Encoding: 7bit |
| X-Priority: 3 (Normal) |
| X-MSMail-Priority: Normal |
| X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) |
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 |
| Importance: Normal |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/2 |
| X-Sequence-Number: 2 |
|
|
| subscribe |
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 10 11:20:22 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 8FE8D47671C |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 11:20:19 -0400 (EDT) |
| Received: from mail.arcamax.com (mail.arcamax.com [209.96.210.69]) |
| by postgresql.org (Postfix) with SMTP id 02ABE476711 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 11:20:18 -0400 (EDT) |
| Received: (qmail 11924 invoked by uid 526); 10 Sep 2002 15:20:20 -0000 |
| Received: from unknown (HELO arcamax.com) (192.168.0.32) |
| by 0 with SMTP; 10 Sep 2002 15:20:20 -0000 |
| Message-ID: <3D7E0DB7.9040108@arcamax.com> |
| Date: Tue, 10 Sep 2002 11:20:23 -0400 |
| From: Bryan White <bryan@arcamax.com> |
| User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; |
| rv:1.1) Gecko/20020826 |
| X-Accept-Language: en-us, en |
| MIME-Version: 1.0 |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| Content-Type: text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS perl-11 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/4 |
| X-Sequence-Number: 4 |
|
|
|
|
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 10 12:02:04 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id B3FB6476534 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 12:02:00 -0400 (EDT) |
| Received: from h009.c021.snv.cp.net (h009.c021.snv.cp.net [209.228.35.179]) |
| by postgresql.org (Postfix) with ESMTP id 2E6BC476515 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 12:02:00 -0400 (EDT) |
| Received: from vengabox.candlefire.org (12.255.22.43) by h009.c021.snv.cp.net |
| (5.6.0.25) (authenticated as jlarson@candlefire.org) |
| id 3D1DA655000EB024 for pgsql-performance@postgresql.org; |
| Tue, 10 Sep 2002 09:02:05 -0700 |
| Date: Tue, 10 Sep 2002 10:07:06 -0600 |
| From: Jason k Larson <postgresql@candlefire.org> |
| X-Mailer: The Bat! (v1.53d) |
| Reply-To: Jason k Larson <jlarson@candlefire.org> |
| Organization: CandleFire Productions |
| X-Priority: 3 (Normal) |
| Message-ID: <1472247656.20020910100706@candlefire.org> |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/5 |
| X-Sequence-Number: 5 |
|
|
| subscribe |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 10 09:53:58 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 801B74763D4 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 09:53:57 -0400 (EDT) |
| Received: from pop.e-it.com (unknown [216.187.113.82]) |
| by postgresql.org (Postfix) with SMTP id 767EA4762D0 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 09:53:53 -0400 (EDT) |
| Received: (qmail 4651 invoked from network); 10 Sep 2002 13:53:56 -0000 |
| Received: from unknown (HELO did-it.com) (66.246.13.35) |
| by 0 with SMTP; 10 Sep 2002 13:53:56 -0000 |
| Message-ID: <3D7E2526.7040307@did-it.com> |
| Date: Tue, 10 Sep 2002 10:00:22 -0700 |
| From: Ericson Smith <eric@did-it.com> |
| User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; |
| rv:1.1) Gecko/20020826 |
| X-Accept-Language: en-us, en |
| MIME-Version: 1.0 |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| Content-Type: text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/3 |
| X-Sequence-Number: 3 |
|
|
| subscribe |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 10 22:07:14 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id BC01D476503 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 22:07:12 -0400 (EDT) |
| Received: from gateway.heart.com.au (unknown [202.44.184.121]) |
| by postgresql.org (Postfix) with ESMTP id CFF27476314 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 10 Sep 2002 22:07:08 -0400 (EDT) |
| Received: from tardis.heart.com.au (IDENT:root@tardis.heart.com.au |
| [192.168.0.42]) |
| by gateway.heart.com.au (8.11.6/8.11.2) with ESMTP id g8B2ZKI18868 |
| for <pgsql-performance@postgresql.org>; Wed, 11 Sep 2002 12:35:20 +1000 |
| Received: from heart.com.au ([192.168.0.53]) |
| by tardis.heart.com.au (8.9.3/8.8.7) with ESMTP id MAA17630 |
| for <pgsql-performance@postgresql.org>; Wed, 11 Sep 2002 12:07:01 +1000 |
| Message-ID: <3D7EA4E4.40106@heart.com.au> |
| Date: Wed, 11 Sep 2002 12:05:24 +1000 |
| From: Keith Gray <keith@heart.com.au> |
| User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; |
| rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 |
| X-Accept-Language: en-us |
| MIME-Version: 1.0 |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| Content-Type: text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/6 |
| X-Sequence-Number: 6 |
|
|
|
|
| -- |
|
|
| Keith Gray |
| Technical Services Manager |
| Heart Consulting Services |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Wed Sep 11 04:47:03 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id AFD06475D57 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 04:46:59 -0400 (EDT) |
| Received: from mail.berusoft.li (ns2.berusoft.li [194.208.67.154]) |
| by postgresql.org (Postfix) with SMTP id E3104475E13 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 04:46:55 -0400 (EDT) |
| Received: (qmail 2444 invoked by uid 99); 11 Sep 2002 10:49:33 -0000 |
| Date: 11 Sep 2002 10:49:33 -0000 |
| Message-ID: <20020911104933.2443.qmail@mail.berusoft.li> |
| Reply-To: "BeruSoft AG" <info@berusoft.com> |
| From: "BeruSoft AG" <info@berusoft.com> |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| X-Mailer: [web.office] by BeruSoft AG |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset="iso-8859-1" |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/7 |
| X-Sequence-Number: 7 |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Wed Sep 11 04:57:28 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id E5D86475D57 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 04:57:27 -0400 (EDT) |
| Received: from mail.berusoft.li (ns2.berusoft.li [194.208.67.154]) |
| by postgresql.org (Postfix) with SMTP id 9C152475CB6 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 04:57:25 -0400 (EDT) |
| Received: (qmail 2596 invoked by uid 99); 11 Sep 2002 11:00:03 -0000 |
| Date: 11 Sep 2002 11:00:03 -0000 |
| Message-ID: <20020911110003.2595.qmail@mail.berusoft.li> |
| Reply-To: nici.bertschler@berusoft.com |
| From: nici.bertschler@berusoft.com |
| To: pgsql-performance@postgresql.org |
| Subject: subscribe |
| X-Mailer: [web.office] by BeruSoft AG |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset="iso-8859-1" |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/8 |
| X-Sequence-Number: 8 |
|
|
| subscribe |
|
|
| From pgsql-performance-owner@postgresql.org Wed Sep 11 07:09:17 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 62E4A4759F5 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 07:09:16 -0400 (EDT) |
| Received: from out-mta3.plasa.com (out-mta2.plasa.com [202.134.0.198]) |
| by postgresql.org (Postfix) with ESMTP id B79CA476506 |
| for <pgsql-performance@postgresql.org>; |
| Wed, 11 Sep 2002 07:09:13 -0400 (EDT) |
| Received: from [61.5.9.21] (helo=portab) |
| by out-mta3.plasa.com with smtp (Exim 4.04) id 17p5Mv-000nOk-00 |
| for pgsql-performance@postgresql.org; Wed, 11 Sep 2002 18:09:13 +0700 |
| Message-ID: <006e01c25984$0e0292c0$1509053d@portab> |
| From: "kopra" <koprahome@telkom.net> |
| To: <pgsql-performance@postgresql.org> |
| Subject: subscribe |
| Date: Wed, 11 Sep 2002 18:05:35 +0700 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| Content-Transfer-Encoding: 7bit |
| X-Priority: 3 |
| X-MSMail-Priority: Normal |
| X-Mailer: Microsoft Outlook Express 6.00.2600.0000 |
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/9 |
| X-Sequence-Number: 9 |
|
|
| subscribe |
|
|
|
|
| ------------------------------------------------------------------------------ |
| > Khusus Pelanggan Telepon DIVRE 2, Tekan 166 untuk mendengarkan pesan Anda |
| ------------------------------------------------------------------------------ |
|
|
| From pgsql-performance-owner@postgresql.org Fri Sep 13 20:16:03 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id D4C364760BC |
| for <pgsql-performance@postgresql.org>; |
| Fri, 13 Sep 2002 20:16:00 -0400 (EDT) |
| Received: from smtp3.ihug.com.au (smtp3.ihug.com.au [203.109.250.76]) |
| by postgresql.org (Postfix) with ESMTP id EBF80475E22 |
| for <pgsql-performance@postgresql.org>; |
| Fri, 13 Sep 2002 20:15:58 -0400 (EDT) |
| Received: from p568-tnt1.mel.ihug.com.au (postgresql.org) [203.173.162.60] |
| by smtp3.ihug.com.au with esmtp (Exim 3.22 |
| id 17q0bQ-00077B-00; Sat, 14 Sep 2002 10:16:00 +1000 |
| Message-ID: <3D827FBF.4F137D2E@postgresql.org> |
| Date: Sat, 14 Sep 2002 10:15:59 +1000 |
| From: Justin Clift <justin@postgresql.org> |
| X-Mailer: Mozilla 4.79 [en] (WinNT; U) |
| X-Accept-Language: en |
| MIME-Version: 1.0 |
| To: PostgreSQL Performance Mailing List <pgsql-performance@postgresql.org> |
| Subject: Anyone have any find grained benchmark data? |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/10 |
| X-Sequence-Number: 10 |
|
|
| Hi everyone, |
|
|
| There are PostgreSQL servers around that are handling 2,000 simultaneous |
| client connections (in real life) without problems, but no-one obvious |
| seems to have yet taken the time to do fine grained testing of the |
| servers which can take this kind of load, to accurately model their |
| performance characteristics. |
|
|
| Does anyone here happen to have fine grained benchmark/performance |
| figures hanging around which get into this range of performance? |
| Preferably with pretty precise details of how the system was configured, |
| etc. |
|
|
| :-) |
|
|
| Regards and best wishes, |
|
|
| Justin Clift |
|
|
| -- |
| "My grandfather once told me that there are two kinds of people: those |
| who work and those who take the credit. He told me to try to be in the |
| first group; there was less competition there." |
| - Indira Gandhi |
|
|
| From pgsql-performance-owner@postgresql.org Tue Sep 17 06:50:17 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 9B7E1475B33 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 17 Sep 2002 06:50:15 -0400 (EDT) |
| Received: from out-mta3.plasa.com (out-mta3.plasa.com [202.134.0.198]) |
| by postgresql.org (Postfix) with ESMTP id CC016475D91 |
| for <pgsql-performance@postgresql.org>; |
| Tue, 17 Sep 2002 06:50:13 -0400 (EDT) |
| Received: from [61.5.16.47] (helo=portab) |
| by out-mta3.plasa.com with smtp (Exim 4.10) id 17rFvo-000YjM-00 |
| for pgsql-performance@postgresql.org; Tue, 17 Sep 2002 17:50:12 +0700 |
| Message-ID: <000101c25e38$66df87a0$2f10053d@portab> |
| From: "kopra" <koprahome@telkom.net> |
| To: <pgsql-performance@postgresql.org> |
| Subject: subscribe |
| Date: Sat, 14 Sep 2002 19:28:03 +0700 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| Content-Transfer-Encoding: 7bit |
| X-Priority: 3 |
| X-MSMail-Priority: Normal |
| X-Mailer: Microsoft Outlook Express 6.00.2600.0000 |
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/11 |
| X-Sequence-Number: 11 |
|
|
| subscribe |
|
|
|
|
| ------------------------------------------------------------------------------ |
| > Khusus Pelanggan Telepon DIVRE 2, Tekan 166 untuk mendengarkan pesan Anda |
| ------------------------------------------------------------------------------ |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 04:35:33 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 51FFF4763DE |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 04:35:20 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 9222E476065 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 04:35:15 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8Q8aVq12622 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 14:06:31 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8Q8aUv12612; |
| Thu, 26 Sep 2002 14:06:31 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 14:05:44 +0530 |
| MIME-Version: 1.0 |
| Subject: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D931438.22010.133ADAFA@localhost> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1161 |
| X-Sequence-Number: 30742 |
|
|
| Hello all, |
|
|
| Some time back I posted a query to build a site with 150GB of database. In last |
| couple of weeks, lots of things were tested at my place and there are some |
| results and again some concerns. |
|
|
| This is a long post. Please be patient and read thr. If we win this, I guess we |
| have a good marketing/advocacy case here..;-) |
|
|
| First the problems (For those who do not read beyond first page) |
|
|
| 1) Database load time from flat file using copy is very high |
| 2) Creating index takes huge amount of time. |
| 3) Any suggsestions for runtime as data load and query will be going in |
| parallel. |
|
|
| Now the details. Note that this is a test run only.. |
|
|
| Platform:- 4x Xeon2.4GHz/4GB RAM/4x48 SCSI RAID5/72 GB SCSI |
| RedHat7.2/PostgreSQL7.1.3 |
|
|
| Database in flat file: |
| 125,000,000 records of around 100 bytes each. |
| Flat file size 12GB |
|
|
| Load time: 14581 sec/~8600 rows persec/~ an MB of data per sec. |
| Create unique composite index on 2 char and a timestamp field: 25226 sec. |
| Database size on disk: 26GB |
| Select query: 1.5 sec. for approx. 150 rows. |
|
|
| Important postgresql.conf settings |
|
|
| sort_mem = 12000 |
| shared_buffers = 24000 |
| fsync=true (Sad but true. Left untouched.. Will that make a difference on |
| SCSI?) |
| wal_buffers = 65536 |
| wal_files = 64 |
|
|
| Now the requirements |
|
|
| Initial flat data load: 250GB of data. This has gone up since last query. It |
| was 150GB earlier.. |
| Ongoing inserts: 5000/sec. |
| Number of queries: 4800 queries/hour |
| Query response time: 10 sec. |
|
|
|
|
| Now questions. |
|
|
| 1) Instead of copying from a single 12GB data file, will a parallel copy from |
| say 5 files will speed up the things? |
|
|
| Couple MB of data per sec. to disk is just not saturating it. It's a RAID 5 |
| setup.. |
| |
| 2) Sort mem.=12K i.e. 94MB, sounds good enough to me. Does this need further |
| addition to improve create index performance? |
| |
| 3) 5K concurrent inserts with an index on, will this need a additional CPU |
| power? Like deploying it on dual RISC CPUs etc? |
| |
| 4) Query performance is not a problem. Though 4.8K queries per sec. expected |
| response time from each query is 10 sec. But my guess is some serius CPU power |
| will be chewed there too.. |
| |
| 5)Will upgrading to 7.2.2/7.3 beta help? |
| |
| All in all, in the test, we didn't see the performance where hardware is |
| saturated to it's limits. So effectively we are not able to get postgresql |
| making use of it. Just pushing WAL and shared buffers does not seem to be the |
| solution. |
| |
| If you guys have any suggestions. let me know. I need them all.. |
| |
| Mysql is almost out because it's creating index for last 17 hours. I don't |
| think it will keep up with 5K inserts per sec. with index. SAP DB is under |
| evaluation too. But postgresql is most favourite as of now because it works. So |
| I need to come up with solutions to problems that will occur in near future.. |
| ;-) |
| |
| TIA.. |
| |
| Bye |
| Shridhar |
| |
| -- |
| Law of Procrastination: Procrastination avoids boredom; one never has the |
| feeling that there is nothing important to do. |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 04:53:43 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id E56844768FD |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 04:53:40 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 2B51C4767DC |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 04:53:39 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8Q8snQ14266 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 14:24:49 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8Q8snv14256; |
| Thu, 26 Sep 2002 14:24:49 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 14:24:02 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D931882.31859.134B9E4C@localhost> |
| In-reply-to: <3D931438.22010.133ADAFA@localhost> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1162 |
| X-Sequence-Number: 30743 |
| |
| On 26 Sep 2002 at 14:05, Shridhar Daithankar wrote: |
| > Some time back I posted a query to build a site with 150GB of database. In last |
| > couple of weeks, lots of things were tested at my place and there are some |
| > results and again some concerns. |
| |
| > 2) Creating index takes huge amount of time. |
| > Load time: 14581 sec/~8600 rows persec/~ an MB of data per sec. |
| > Create unique composite index on 2 char and a timestamp field: 25226 sec. |
| > Database size on disk: 26GB |
| > Select query: 1.5 sec. for approx. 150 rows. |
| |
| > 2) Sort mem.=12K i.e. 94MB, sounds good enough to me. Does this need further |
| > addition to improve create index performance? |
| |
| Just a thought. If I sort the table before making an index, would it be faster |
| than creating index on raw table? And/or if at all, how do I sort the table |
| without duplicating it? |
| |
| Just a wild thought.. |
| |
| Bye |
| Shridhar |
| |
| -- |
| linux: the choice of a GNU generation(ksh@cis.ufl.edu put this on Tshirts in |
| '93) |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:06:18 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id A48884761EA; Thu, 26 Sep 2002 05:06:16 -0400 (EDT) |
| Received: from svana.org (t1-1-076.dialup.apex.net.au [203.20.62.76]) |
| by postgresql.org (Postfix) with ESMTP |
| id B99B24760CD; Thu, 26 Sep 2002 05:06:15 -0400 (EDT) |
| Received: from kleptog by svana.org with local (Exim 3.35 |
| id 17uUaF-0002nB-00; Thu, 26 Sep 2002 19:05:19 +1000 |
| Date: Thu, 26 Sep 2002 19:05:19 +1000 |
| From: Martijn van Oosterhout <kleptog@svana.org> |
| To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in> |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: Performance while loading data and indexing |
| Message-ID: <20020926090519.GB10471@svana.org> |
| Reply-To: Martijn van Oosterhout <kleptog@svana.org> |
| Mail-Followup-To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| References: <3D931438.22010.133ADAFA@localhost> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| Content-Disposition: inline |
| In-Reply-To: <3D931438.22010.133ADAFA@localhost> |
| User-Agent: Mutt/1.3.28i |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1163 |
| X-Sequence-Number: 30744 |
|
|
| I'll preface this by saying that while I have a large database, it doesn't |
| require quite the performace you're talking about here. |
| |
| On Thu, Sep 26, 2002 at 02:05:44PM +0530, Shridhar Daithankar wrote: |
| > 1) Database load time from flat file using copy is very high |
| > 2) Creating index takes huge amount of time. |
| > 3) Any suggsestions for runtime as data load and query will be going in |
| > parallel. |
| |
| You're loading all the data in one copy. I find that INSERTs are mostly |
| limited by indexes. While index lookups are cheap, they are not free and |
| each index needs to be updated for each row. |
|
|
| I fond using partial indexes to only index the rows you actually use can |
| help with the loading. It's a bit obscure though. |
| |
| As for parallel loading, you'll be limited mostly by your I/O bandwidth. |
| Have you measured it to take sure it's up to speed? |
| |
| > Now the details. Note that this is a test run only.. |
| > |
| > Platform:- 4x Xeon2.4GHz/4GB RAM/4x48 SCSI RAID5/72 GB SCSI |
| > RedHat7.2/PostgreSQL7.1.3 |
| > |
| > Database in flat file: |
| > 125,000,000 records of around 100 bytes each. |
| > Flat file size 12GB |
| > |
| > Load time: 14581 sec/~8600 rows persec/~ an MB of data per sec. |
| > Create unique composite index on 2 char and a timestamp field: 25226 sec. |
| > Database size on disk: 26GB |
| > Select query: 1.5 sec. for approx. 150 rows. |
| |
| So you're loading at a rate of 860KB per sec. That's not too fast. How many |
| indexes are active at that time? Triggers and foreign keys also take their |
| toll. |
| |
| > Important postgresql.conf settings |
| > |
| > sort_mem = 12000 |
| > shared_buffers = 24000 |
| > fsync=true (Sad but true. Left untouched.. Will that make a difference on |
| > SCSI?) |
| > wal_buffers = 65536 |
| > wal_files = 64 |
| |
| fsync IIRC only affects the WAL buffers now but it may be quite expensive, |
| especially considering it's running on every transaction commit. Oh, your |
| WAL files are on a seperate disk from the data? |
|
|
| > Initial flat data load: 250GB of data. This has gone up since last query. It |
| > was 150GB earlier.. |
| > Ongoing inserts: 5000/sec. |
| > Number of queries: 4800 queries/hour |
| > Query response time: 10 sec. |
|
|
| That looks quite acheivable. |
|
|
| > 1) Instead of copying from a single 12GB data file, will a parallel copy from |
| > say 5 files will speed up the things? |
|
|
| Limited by I/O bandwidth. On linux vmstat can tell you how many blocks are |
| being loaded and stored per second. Try it. As long as sync() doesn't get |
| done too often, it should be help. |
| |
| > Couple MB of data per sec. to disk is just not saturating it. It's a RAID 5 |
| > setup.. |
|
|
| No, it's not. You should be able to do better. |
| |
| > 2) Sort mem.=12K i.e. 94MB, sounds good enough to me. Does this need further |
| > addition to improve create index performance? |
| |
| Should be fine. Admittedly your indexes are taking rather long to build. |
| |
| > 3) 5K concurrent inserts with an index on, will this need a additional CPU |
| > power? Like deploying it on dual RISC CPUs etc? |
| |
| It shouldn't. Do you have an idea of what your CPU usage is? ps aux should |
| give you a decent idea. |
|
|
| > 4) Query performance is not a problem. Though 4.8K queries per sec. expected |
| > response time from each query is 10 sec. But my guess is some serius CPU power |
| > will be chewed there too.. |
|
|
| Should be fine. |
|
|
| > 5)Will upgrading to 7.2.2/7.3 beta help? |
|
|
| Possibly, though it may be wirth it just for the features/bugfixes. |
|
|
| > All in all, in the test, we didn't see the performance where hardware is |
| > saturated to it's limits. So effectively we are not able to get postgresql |
| > making use of it. Just pushing WAL and shared buffers does not seem to be the |
| > solution. |
| > |
| > If you guys have any suggestions. let me know. I need them all.. |
|
|
| Find the bottleneck: CPU, I/O or memory? |
|
|
| > Mysql is almost out because it's creating index for last 17 hours. I don't |
| > think it will keep up with 5K inserts per sec. with index. SAP DB is under |
| > evaluation too. But postgresql is most favourite as of now because it works. So |
| > I need to come up with solutions to problems that will occur in near future.. |
| > ;-) |
|
|
| 17 hours! Ouch. Either way, you should be able to do much better. Hope this |
| helps, |
| -- |
| Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ |
| > There are 10 kinds of people in the world, those that can do binary |
| > arithmetic and those that can't. |
| |
| From pgsql-hackers-owner@postgresql.org Thu Sep 26 05:12:58 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 34B1A47616F |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 05:12:56 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 3DF80475F47 |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 05:12:53 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8Q9E6m15849 |
| for <pgsql-hackers@postgresql.org>; Thu, 26 Sep 2002 14:44:06 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8Q9E6v15839; |
| Thu, 26 Sep 2002 14:44:06 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: paolo.cassago@talentmanager.com |
| Date: Thu, 26 Sep 2002 14:43:20 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Cc: pgsql-hackers@postgresql.org |
| Message-ID: <3D931D08.1695.135D474B@localhost> |
| In-reply-to: |
| <19138.194.185.48.247.1033030286.squirrel@mail.talentwebsolutions.com> |
| References: <3D931882.31859.134B9E4C@localhost> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1525 |
| X-Sequence-Number: 29482 |
| |
| On 26 Sep 2002 at 10:51, paolo.cassago@talentmanager.c wrote: |
| |
| > Hi, |
| > it seems you have to cluster it, I don't think you have another choise. |
|
|
| Hmm.. That didn't occur to me...I guess some real time clustering like usogres |
| would do. Unless it turns out to be a performance hog.. |
| |
| But this is just insert and select. No updates no deletes(Unless customer makes |
| a 180 degree turn) So I doubt if clustering will help. At the most I can |
| replicate data across machines and spread queries on them. Replication overhead |
| as a down side and low query load on each machine as upside.. |
| |
| > I'm retrieving the configuration of our postgres servers (I'm out of office |
| > now), so I can send it to you. I was quite disperate about performance, and |
| > I was thinking to migrate the data on an oracle database. Then I found this |
| > configuration on the net, and I had a succesfull increase of performance. |
| |
| In this case, we are upto postgresql because we/our customer wants to keep the |
| costs down..:-) Even they are asking now if it's possible to keep hardware |
| costs down as well. That's getting some funny responses here but I digress.. |
| |
| > Maybe this can help you. |
| > |
| > Why you use copy to insert records? I usually use perl scripts, and they |
| > work well . |
| |
| Performance reasons. As I said in one of my posts earlier, putting upto 100K |
| records in one transaction in steps of 10K did not reach performance of copy. |
| As Tom said rightly, it was a 4-1 ratio despite using transactions.. |
| |
| Thanks once again.. |
| Bye |
| Shridhar |
| |
| -- |
| Secretary's Revenge: Filing almost everything under "the". |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:17:41 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id C6DFF4763DE; Thu, 26 Sep 2002 05:17:39 -0400 (EDT) |
| Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28]) |
| by postgresql.org (Postfix) with ESMTP |
| id 24E4847631F; Thu, 26 Sep 2002 05:17:39 -0400 (EDT) |
| Received: from p555-tnt2.mel.ihug.com.au (postgresql.org) [203.173.166.47] |
| by new-smtp2.ihug.com.au with esmtp (Exim 3.22 |
| id 17uUm7-00005d-00; Thu, 26 Sep 2002 19:17:35 +1000 |
| Message-ID: <3D92D0AC.CE6114C4@postgresql.org> |
| Date: Thu, 26 Sep 2002 19:17:32 +1000 |
| From: Justin Clift <justin@postgresql.org> |
| X-Mailer: Mozilla 4.79 [en] (WinNT; U) |
| X-Accept-Language: en |
| MIME-Version: 1.0 |
| To: shridhar_daithankar@persistent.co.in |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: Performance while loading data and indexing |
| References: <3D931438.22010.133ADAFA@localhost> |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1164 |
| X-Sequence-Number: 30745 |
|
|
| Hi Shridhar, |
|
|
| Shridhar Daithankar wrote: |
| <snip> |
| > 3) Any suggsestions for runtime as data load and query will be going in |
| > parallel. |
|
|
| That sounds unusual. From reading this, it *sounds* like you'll be |
| running queries against an incomplete dataset, or maybe just running the |
| queries that affect the tables loaded thus far (during the initial |
| load). |
| |
| <snip> |
| > fsync=true (Sad but true. Left untouched.. Will that make a difference on |
| > SCSI?) |
| |
| Definitely. Have directly measured a ~ 2x tps throughput increase on |
| FreeBSD when leaving fsync off whilst performance measuring stuff |
| recently (PG 7.2.2). Like anything it'll depend on workload, phase of |
| moon, etc, but it's a decent indicator. |
| |
| <snip> |
| > Now questions. |
| > |
| > 1) Instead of copying from a single 12GB data file, will a parallel copy from |
| > say 5 files will speed up the things? |
| |
| Not sure yet. Haven't get done enough performance testing (on the cards |
| very soon though). |
|
|
| > Couple MB of data per sec. to disk is just not saturating it. It's a RAID 5 |
| > setup.. |
| |
| fsync = off would help during the data load, but not a good idea if |
| you're going to be running queries against it at the same time. |
|
|
| Am still getting the hang of performance tuning stuff. Have a bunch of |
| Ultra160 hardware for the Intel platform, and am testing against it as |
| time permits. |
|
|
| Not as high end as I'd like, but it's a start. |
|
|
| :-) |
|
|
| Regards and best wishes, |
|
|
| Justin Clift |
|
|
| <snip> |
| > Bye |
| > Shridhar |
|
|
| -- |
| "My grandfather once told me that there are two kinds of people: those |
| who work and those who take the credit. He told me to try to be in the |
| first group; there was less competition there." |
| - Indira Gandhi |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:35:14 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id C25DF47644C |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:35:13 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 0925D47616F |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:35:10 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8Q9aQg18125 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 15:06:26 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8Q9aQv18115; |
| Thu, 26 Sep 2002 15:06:26 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 15:05:40 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D932244.13502.1371B9CA@localhost> |
| In-reply-to: <3D92D0AC.CE6114C4@postgresql.org> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1166 |
| X-Sequence-Number: 30747 |
|
|
| On 26 Sep 2002 at 19:17, Justin Clift wrote: |
| > Shridhar Daithankar wrote: |
| > <snip> |
| > > 3) Any suggsestions for runtime as data load and query will be going in |
| > > parallel. |
| > |
| > That sounds unusual. From reading this, it *sounds* like you'll be |
| > running queries against an incomplete dataset, or maybe just running the |
| > queries that affect the tables loaded thus far (during the initial |
| > load). |
| |
| That's correct. Load the data so far and keep inserting data as and when it |
| generates. |
|
|
| They don't mind running against data so far. It's not very accurate stuff |
| IMO... |
|
|
| > > fsync=true (Sad but true. Left untouched.. Will that make a difference on |
| > > SCSI?) |
| > |
| > Definitely. Have directly measured a ~ 2x tps throughput increase on |
| > FreeBSD when leaving fsync off whilst performance measuring stuff |
| > recently (PG 7.2.2). Like anything it'll depend on workload, phase of |
| > moon, etc, but it's a decent indicator. |
|
|
| I didn't know even that matters with SCSI..Will check out.. |
| |
| > fsync = off would help during the data load, but not a good idea if |
| > you're going to be running queries against it at the same time. |
|
|
| That's OK for the reasons mentioned above. It wouldn't be out of place to |
| expect a UPS to such an installation... |
|
|
| Bye |
| Shridhar |
|
|
| -- |
| Hoare's Law of Large Problems: Inside every large problem is a small problem |
| struggling to get out. |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:46:29 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 75E39476B20 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:46:27 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 548F847644C |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:46:23 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8Q9la019303 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 15:17:36 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8Q9lav19293; |
| Thu, 26 Sep 2002 15:17:36 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 15:16:50 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D9324E2.30195.137BF348@localhost> |
| In-reply-to: <20020926090519.GB10471@svana.org> |
| References: <3D931438.22010.133ADAFA@localhost> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1167 |
| X-Sequence-Number: 30748 |
| |
| On 26 Sep 2002 at 19:05, Martijn van Oosterhout wrote: |
| |
| > On Thu, Sep 26, 2002 at 02:05:44PM +0530, Shridhar Daithankar wrote: |
| > > 1) Database load time from flat file using copy is very high |
| > > 2) Creating index takes huge amount of time. |
| > > 3) Any suggsestions for runtime as data load and query will be going in |
| > > parallel. |
| > |
| > You're loading all the data in one copy. I find that INSERTs are mostly |
| > limited by indexes. While index lookups are cheap, they are not free and |
| > each index needs to be updated for each row. |
| > |
| > I fond using partial indexes to only index the rows you actually use can |
| > help with the loading. It's a bit obscure though. |
| > |
| > As for parallel loading, you'll be limited mostly by your I/O bandwidth. |
| > Have you measured it to take sure it's up to speed? |
| |
| Well. It's like this, as of now.. CreateDB->create table->create index->Select. |
|
|
| So loading is not slowed by index. As of your hint of vmstat, will check it |
| out. |
| > So you're loading at a rate of 860KB per sec. That's not too fast. How many |
| > indexes are active at that time? Triggers and foreign keys also take their |
| > toll. |
|
|
| Nothing except the table where data os loaded.. |
|
|
| > fsync IIRC only affects the WAL buffers now but it may be quite expensive, |
| > especially considering it's running on every transaction commit. Oh, your |
| > WAL files are on a seperate disk from the data? |
| |
| No. Same RAID 5 disks.. |
| |
| > It shouldn't. Do you have an idea of what your CPU usage is? ps aux should |
| > give you a decent idea. |
|
|
| I guess we forgot to monitor system parameters. Next on my list is running |
| vmstat, top and tuning bdflush. |
| |
| > Find the bottleneck: CPU, I/O or memory? |
|
|
| Understood.. |
| > |
| > > Mysql is almost out because it's creating index for last 17 hours. I don't |
| > > think it will keep up with 5K inserts per sec. with index. SAP DB is under |
| > > evaluation too. But postgresql is most favourite as of now because it works. So |
| > > I need to come up with solutions to problems that will occur in near future.. |
| > > ;-) |
| > |
| > 17 hours! Ouch. Either way, you should be able to do much better. Hope this |
| > helps, |
|
|
| Heh.. no wonder this evaluation is taking more than 2 weeks.. Mysql was running |
| out of disk space while creating index and crashin. An upgrade to mysql helped |
| there but no numbers as yet.. |
|
|
| Thanks once again... |
| Bye |
| Shridhar |
|
|
| -- |
| Boren's Laws: (1) When in charge, ponder. (2) When in trouble, delegate. (3) |
| When in doubt, mumble. |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:59:51 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 13499476C17 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:59:51 -0400 (EDT) |
| Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net |
| [194.217.242.80]) |
| by postgresql.org (Postfix) with ESMTP id 76F3C476C01 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 05:59:50 -0400 (EDT) |
| Received: from mwynhau.demon.co.uk ([193.237.186.96] |
| helo=mainbox.archonet.com) |
| by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) |
| id 17uVR1-0003WF-0U; Thu, 26 Sep 2002 10:59:51 +0100 |
| Received: from localhost (localhost.localdomain [127.0.0.1]) |
| by mainbox.archonet.com (Postfix) with ESMTP |
| id 5B12716378; Thu, 26 Sep 2002 10:49:02 +0100 (BST) |
| Received: from client.archonet.com (client.archonet.com [192.168.1.16]) |
| by mainbox.archonet.com (Postfix) with ESMTP |
| id AE86216367; Thu, 26 Sep 2002 10:49:01 +0100 (BST) |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| From: Richard Huxton <dev@archonet.com> |
| Organization: Archonet Ltd |
| To: shridhar_daithankar@persistent.co.in, |
| pgsql-general@postgresql.org |
| Subject: Re: Performance while loading data and indexing |
| Date: Thu, 26 Sep 2002 10:48:06 +0100 |
| User-Agent: KMail/1.4.1 |
| References: <3D931438.22010.133ADAFA@localhost> |
| In-Reply-To: <3D931438.22010.133ADAFA@localhost> |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: quoted-printable |
| Message-Id: <200209261048.07761.dev@archonet.com> |
| X-Virus-Scanned: by AMaViS snapshot-20020531 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1172 |
| X-Sequence-Number: 30753 |
| |
| On Thursday 26 Sep 2002 9:35 am, Shridhar Daithankar wrote: |
| |
| [questions re: large database] |
| |
| Before reading my advice please bear in mind you are operating way beyond t= |
| he=20 |
| scale of anything I have ever built. |
| |
| > Now the details. Note that this is a test run only.. |
| > |
| > Platform:- 4x Xeon2.4GHz/4GB RAM/4x48 SCSI RAID5/72 GB SCSI |
| > RedHat7.2/PostgreSQL7.1.3 |
| > |
| > Database in flat file: |
| > 125,000,000 records of around 100 bytes each. |
| > Flat file size 12GB |
| > |
| > Load time: 14581 sec/~8600 rows persec/~ an MB of data per sec. |
| > Create unique composite index on 2 char and a timestamp field: 25226 sec. |
| > Database size on disk: 26GB |
| > Select query: 1.5 sec. for approx. 150 rows. |
| > |
| > Important postgresql.conf settings |
| [snipped setting details for moment] |
| |
| Have you tried putting the wal files, syslog etc on separate disks/volumes?= |
| If=20 |
| you've settled on Intel, about the only thing you can optimise further is t= |
| he=20 |
| disks. |
|
|
| Oh - and the OS - make sure you're running a (good) recent kernel for that= |
| =20 |
| sort of hardware, I seem to remember some substantial changes in the 2.4=20 |
| series regarding multi-processor. |
| |
| > Now the requirements |
| > |
| > Initial flat data load: 250GB of data. This has gone up since last query. |
| > It was 150GB earlier.. |
| > Ongoing inserts: 5000/sec. |
| > Number of queries: 4800 queries/hour |
| > Query response time: 10 sec. |
| |
| Is this 5000 rows in say 500 transactions or 5000 insert transactions per= |
| =20 |
| second. How many concurrent clients is this? Similarly for the 4800 queries= |
| ,=20 |
| how many concurrent clients is this? Are they expected to return approx 150= |
| =20 |
| rows as in your test? |
| |
| > Now questions. |
| > |
| > 1) Instead of copying from a single 12GB data file, will a parallel copy |
| > from say 5 files will speed up the things? |
| |
| If the CPU is the bottle-neck then it should, but it's difficult to say=20 |
| without figures. |
|
|
| > Couple MB of data per sec. to disk is just not saturating it. It's a RAID= |
| 5 |
| > setup.. |
| |
| What is saturating during the flat-file load? Something must be maxed in to= |
| p /=20 |
| iostat / vmstat. |
| |
| [snip] |
| > |
| > 5)Will upgrading to 7.2.2/7.3 beta help? |
| |
| It's unlikely to hurt. |
|
|
| > All in all, in the test, we didn't see the performance where hardware is |
| > saturated to it's limits. |
|
|
| Something *must* be. |
|
|
| What are your disaster recovery plans? I can see problems with taking backu= |
| ps=20 |
| if this beast is live 24/7. |
|
|
| - Richard Huxton |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:50:02 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 6D16F4761DF; Thu, 26 Sep 2002 05:50:00 -0400 (EDT) |
| Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28]) |
| by postgresql.org (Postfix) with ESMTP |
| id 79EAE47616F; Thu, 26 Sep 2002 05:49:59 -0400 (EDT) |
| Received: from p555-tnt2.mel.ihug.com.au (postgresql.org) [203.173.166.47] |
| by new-smtp2.ihug.com.au with esmtp (Exim 3.22 |
| id 17uVHP-000184-00; Thu, 26 Sep 2002 19:49:55 +1000 |
| Message-ID: <3D92D841.3E02B2A8@postgresql.org> |
| Date: Thu, 26 Sep 2002 19:49:53 +1000 |
| From: Justin Clift <justin@postgresql.org> |
| X-Mailer: Mozilla 4.79 [en] (WinNT; U) |
| X-Accept-Language: en |
| MIME-Version: 1.0 |
| To: shridhar_daithankar@persistent.co.in |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <3D932244.13502.1371B9CA@localhost> |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1168 |
| X-Sequence-Number: 30749 |
|
|
| Shridhar Daithankar wrote: |
| <snip> |
| > > > fsync=true (Sad but true. Left untouched.. Will that make a difference on |
| > > > SCSI?) |
| > > |
| > > Definitely. Have directly measured a ~ 2x tps throughput increase on |
| > > FreeBSD when leaving fsync off whilst performance measuring stuff |
| > > recently (PG 7.2.2). Like anything it'll depend on workload, phase of |
| > > moon, etc, but it's a decent indicator. |
| > |
| > I didn't know even that matters with SCSI..Will check out.. |
| |
| Cool. When testing it had FreeBSD 4.6.2 installed on one drive along |
| with the PostgreSQL 7.2.2 binaries, it had the data on a second drive |
| (mounted as /pgdata), and it had the pg_xlog directory mounted on a |
| third drive. Swap had it's own drive as well. |
|
|
| Everything is UltraSCSI, etc. Haven't yet tested for a performance |
| difference through moving the indexes to another drive after creation |
| though. That apparently has the potential to help as well. |
| |
| :-) |
| |
| Regards and best wishes, |
| |
| Justin Clift |
| |
| -- |
| "My grandfather once told me that there are two kinds of people: those |
| who work and those who take the credit. He told me to try to be in the |
| first group; there was less competition there." |
| - Indira Gandhi |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 05:56:37 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 7E7F9476B72; Thu, 26 Sep 2002 05:56:36 -0400 (EDT) |
| Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28]) |
| by postgresql.org (Postfix) with ESMTP |
| id 4AB45476B45; Thu, 26 Sep 2002 05:56:34 -0400 (EDT) |
| Received: from p555-tnt2.mel.ihug.com.au (postgresql.org) [203.173.166.47] |
| by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian)) |
| id 17uVNr-0001Ml-00; Thu, 26 Sep 2002 19:56:35 +1000 |
| Message-ID: <3D92D9D2.64CF55F7@postgresql.org> |
| Date: Thu, 26 Sep 2002 19:56:34 +1000 |
| From: Justin Clift <justin@postgresql.org> |
| X-Mailer: Mozilla 4.79 [en] (WinNT; U) |
| X-Accept-Language: en |
| MIME-Version: 1.0 |
| To: shridhar_daithankar@persistent.co.in |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D9324E2.30195.137BF348@localhost> |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1171 |
| X-Sequence-Number: 30752 |
| |
| Shridhar Daithankar wrote: |
| > |
| > On 26 Sep 2002 at 19:05, Martijn van Oosterhout wrote: |
| <snip> |
| > > fsync IIRC only affects the WAL buffers now but it may be quite expensive, |
| > > especially considering it's running on every transaction commit. Oh, your |
| > > WAL files are on a seperate disk from the data? |
| > |
| > No. Same RAID 5 disks.. |
|
|
| Not sure if this is a good idea. Would have to think deeply about the |
| controller and drive optimisation/load characteristics. |
|
|
| If it's any help, when I was testing recently with WAL on a separate |
| drive, the WAL logs were doing more read&writes per second than the main |
| data drive. This would of course be affected by the queries you are |
| running against the database. I was just running Tatsuo's TPC-B stuff, |
| and the OSDB AS3AP tests. |
|
|
| > I guess we forgot to monitor system parameters. Next on my list is running |
| > vmstat, top and tuning bdflush. |
|
|
| That'll just be the start of it for serious performance tuning and |
| learning how PostgreSQL works. :) |
| |
| <snip> |
| > Thanks once again... |
| > Bye |
| > Shridhar |
| |
| -- |
| "My grandfather once told me that there are two kinds of people: those |
| who work and those who take the credit. He told me to try to be in the |
| first group; there was less competition there." |
| - Indira Gandhi |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 10:34:21 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 05F75476AA7; Thu, 26 Sep 2002 10:34:20 -0400 (EDT) |
| Received: from sss.pgh.pa.us (unknown [192.204.191.242]) |
| by postgresql.org (Postfix) with ESMTP |
| id 6AFEC4767D7; Thu, 26 Sep 2002 10:34:18 -0400 (EDT) |
| Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) |
| by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8QEXwhR003937; |
| Thu, 26 Sep 2002 10:33:58 -0400 (EDT) |
| To: shridhar_daithankar@persistent.co.in |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: Performance while loading data and indexing |
| In-reply-to: <3D931438.22010.133ADAFA@localhost> |
| References: <3D931438.22010.133ADAFA@localhost> |
| Comments: In-reply-to "Shridhar Daithankar" |
| <shridhar_daithankar@persistent.co.in> |
| message dated "Thu, 26 Sep 2002 14:05:44 +0530" |
| Date: Thu, 26 Sep 2002 10:33:58 -0400 |
| Message-ID: <3936.1033050838@sss.pgh.pa.us> |
| From: Tom Lane <tgl@sss.pgh.pa.us> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1181 |
| X-Sequence-Number: 30762 |
| |
| "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes: |
| > RedHat7.2/PostgreSQL7.1.3 |
| |
| I'd suggest a newer release of Postgres ... 7.1.3 is pretty old ... |
|
|
| > Create unique composite index on 2 char and a timestamp field: 25226 sec. |
|
|
| What do you mean by "char" exactly? If it's really char(N), how much |
| are you paying in padding space? There are very very few cases where |
| I'd not say to use varchar(N), or text, instead. Also, does it have to |
| be character data? If you could use an integer or float datatype |
| instead the index operations should be faster (though I can't say by |
| how much). Have you thought carefully about the order in which the |
| composite index columns are listed? |
| |
| > sort_mem = 12000 |
| |
| To create an index of this size, you want to push sort_mem as high as it |
| can go without swapping. 12000 sounds fine for the global setting, but |
| in the process that will create the index, try setting sort_mem to some |
| hundreds of megs or even 1Gb. (But be careful: the calculation of space |
| actually used by CREATE INDEX is off quite a bit in pre-7.3 releases |
| :-(. You should probably expect the actual process size to grow to two |
| or three times what you set sort_mem to. Don't let it get so big as to |
| swap.) |
|
|
| > wal_buffers = 65536 |
|
|
| The above is a complete waste of memory space, which would be better |
| spent on letting the kernel expand its disk cache. There's no reason |
| for wal_buffers to be more than a few dozen. |
| |
| regards, tom lane |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 10:42:11 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 45ACE476D3D; Thu, 26 Sep 2002 10:42:11 -0400 (EDT) |
| Received: from sss.pgh.pa.us (unknown [192.204.191.242]) |
| by postgresql.org (Postfix) with ESMTP |
| id B5B5B476D3A; Thu, 26 Sep 2002 10:42:10 -0400 (EDT) |
| Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) |
| by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8QEg8hR004032; |
| Thu, 26 Sep 2002 10:42:09 -0400 (EDT) |
| To: Justin Clift <justin@postgresql.org> |
| Cc: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-reply-to: <3D92D9D2.64CF55F7@postgresql.org> |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D9324E2.30195.137BF348@localhost> |
| <3D92D9D2.64CF55F7@postgresql.org> |
| Comments: In-reply-to Justin Clift <justin@postgresql.org> |
| message dated "Thu, 26 Sep 2002 19:56:34 +1000" |
| Date: Thu, 26 Sep 2002 10:42:08 -0400 |
| Message-ID: <4031.1033051328@sss.pgh.pa.us> |
| From: Tom Lane <tgl@sss.pgh.pa.us> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1183 |
| X-Sequence-Number: 30764 |
| |
| Justin Clift <justin@postgresql.org> writes: |
| >> On 26 Sep 2002 at 19:05, Martijn van Oosterhout wrote: |
| >>> fsync IIRC only affects the WAL buffers now but it may be quite expensive, |
| >>> especially considering it's running on every transaction commit. Oh, your |
| >>> WAL files are on a seperate disk from the data? |
|
|
| > Not sure if this is a good idea. Would have to think deeply about the |
| > controller and drive optimisation/load characteristics. |
|
|
| > If it's any help, when I was testing recently with WAL on a separate |
| > drive, the WAL logs were doing more read&writes per second than the main |
| > data drive. |
| |
| ... but way fewer seeks. For anything involving lots of updating |
| transactions (and certainly 5000 separate insertions per second would |
| qualify; can those be batched??), it should be a win to put WAL on its |
| own spindle, just to get locality of access to the WAL. |
| |
| regards, tom lane |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 10:51:34 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id DEDD4475EE4 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 10:51:33 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 4CAFB475CB4 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 10:51:32 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8QEqqK15165 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 20:22:52 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8QEqqv15154; |
| Thu, 26 Sep 2002 20:22:52 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 20:22:05 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D936C6D.12380.14936AEC@localhost> |
| References: <3D931438.22010.133ADAFA@localhost> |
| In-reply-to: <3936.1033050838@sss.pgh.pa.us> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1187 |
| X-Sequence-Number: 30768 |
| |
| On 26 Sep 2002 at 10:33, Tom Lane wrote: |
| |
| > "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes: |
| > > RedHat7.2/PostgreSQL7.1.3 |
| > |
| > I'd suggest a newer release of Postgres ... 7.1.3 is pretty old ... |
|
|
| I agree.. downloadind 7.2.2 right away.. |
|
|
| > > Create unique composite index on 2 char and a timestamp field: 25226 sec. |
| > |
| > What do you mean by "char" exactly? If it's really char(N), how much |
| > are you paying in padding space? There are very very few cases where |
| > I'd not say to use varchar(N), or text, instead. Also, does it have to |
| > be character data? If you could use an integer or float datatype |
| > instead the index operations should be faster (though I can't say by |
| > how much). Have you thought carefully about the order in which the |
| > composite index columns are listed? |
| |
| I have forwarded the idea of putting things into number. If it causes speedup |
| in index lookup/creation, it would do. Looks like bigint is the order of the |
| day.. |
| |
| > |
| > > sort_mem = 12000 |
| > |
| > To create an index of this size, you want to push sort_mem as high as it |
| > can go without swapping. 12000 sounds fine for the global setting, but |
| > in the process that will create the index, try setting sort_mem to some |
| > hundreds of megs or even 1Gb. (But be careful: the calculation of space |
| > actually used by CREATE INDEX is off quite a bit in pre-7.3 releases |
| > :-(. You should probably expect the actual process size to grow to two |
| > or three times what you set sort_mem to. Don't let it get so big as to |
| > swap.) |
|
|
| Great. I was skeptical to push it beyond 100MB. Now I can push it to corners.. |
|
|
| > > wal_buffers = 65536 |
| > |
| > The above is a complete waste of memory space, which would be better |
| > spent on letting the kernel expand its disk cache. There's no reason |
| > for wal_buffers to be more than a few dozen. |
| |
| That was a rather desparate move. Nothing was improving performance and then we |
| started pushing numbers.. WIll get it back.. Same goes for 64 WAL files.. A GB |
| looks like waste to me.. |
| |
| I might have found the bottleneck, although by accident. Mysql was running out |
| of space while creating index. So my friend shut down mysql and tried to move |
| things by hand to create links. He noticed that even things like cp were |
| terribly slow and it hit us.. May be the culprit is the file system. Ext3 in |
| this case. |
| |
| My friend argues for ext2 to eliminate journalling overhead but I favour |
| reiserfs personally having used it in pgbench with 10M rows on paltry 20GB IDE |
| disk for 25 tps.. |
| |
| We will be attempting raiserfs and/or XFS if required. I know how much speed |
| difference exists between resiserfs and ext2. Would not be surprised if |
| everythng just starts screaming in one go.. |
| |
| Bye |
| Shridhar |
| |
| -- |
| Cropp's Law: The amount of work done varies inversly with the time spent in the |
| office. |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 10:57:42 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 79B71476141 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 10:57:41 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 0C288475FBD |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 10:57:40 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8QEww115498 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 20:28:58 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8QEwwv15488; |
| Thu, 26 Sep 2002 20:28:58 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Date: Thu, 26 Sep 2002 20:28:11 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Message-ID: <3D936DDB.26585.14990280@localhost> |
| References: <3D92D9D2.64CF55F7@postgresql.org> |
| In-reply-to: <4031.1033051328@sss.pgh.pa.us> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1188 |
| X-Sequence-Number: 30769 |
|
|
| On 26 Sep 2002 at 10:42, Tom Lane wrote: |
|
|
| > Justin Clift <justin@postgresql.org> writes: |
| > > If it's any help, when I was testing recently with WAL on a separate |
| > > drive, the WAL logs were doing more read&writes per second than the main |
| > > data drive. |
| > |
| > ... but way fewer seeks. For anything involving lots of updating |
| > transactions (and certainly 5000 separate insertions per second would |
| > qualify; can those be batched??), it should be a win to put WAL on its |
| > own spindle, just to get locality of access to the WAL. |
| |
| Probably they will be a single transcation. If possible we will bunch more of |
| them together.. like 5 seconds of data pushed down in a single transaction but |
| not sure it's possible.. |
|
|
| This is bit like replication but from live oracle machine to postgres, from |
| information I have. So there should be some chance of tuning there.. |
|
|
| Bye |
| Shridhar |
|
|
| -- |
| Langsam's Laws: (1) Everything depends. (2) Nothing is always. (3) Everything |
| is sometimes. |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 11:07:07 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id B7B27476D50; Thu, 26 Sep 2002 11:07:06 -0400 (EDT) |
| Received: from mx.webmailstation.com (mx.webmailstation.com [64.23.55.10]) |
| by postgresql.org (Postfix) with ESMTP |
| id 24B2C476D4E; Thu, 26 Sep 2002 11:07:06 -0400 (EDT) |
| Received: from dyp (localhost.localdomain [127.0.0.1]) |
| by mx.webmailstation.com (Postfix) with ESMTP |
| id 202E51F85F; Thu, 26 Sep 2002 07:04:18 -0400 (EDT) |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| From: Denis Perchine <dyp@perchine.com> |
| Organization: AcademSoft Ltd. |
| To: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| Date: Thu, 26 Sep 2002 22:04:41 +0700 |
| User-Agent: KMail/1.4.3 |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D936C6D.12380.14936AEC@localhost> |
| In-Reply-To: <3D936C6D.12380.14936AEC@localhost> |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 8bit |
| Message-Id: <200209262204.41638.dyp@perchine.com> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1189 |
| X-Sequence-Number: 30770 |
| |
| On Thursday 26 September 2002 21:52, Shridhar Daithankar wrote: |
| |
| > I might have found the bottleneck, although by accident. Mysql was running |
| > out of space while creating index. So my friend shut down mysql and tried |
| > to move things by hand to create links. He noticed that even things like cp |
| > were terribly slow and it hit us.. May be the culprit is the file system. |
| > Ext3 in this case. |
| > |
| > My friend argues for ext2 to eliminate journalling overhead but I favour |
| > reiserfs personally having used it in pgbench with 10M rows on paltry 20GB |
| > IDE disk for 25 tps.. |
| > |
| > We will be attempting raiserfs and/or XFS if required. I know how much |
| > speed difference exists between resiserfs and ext2. Would not be surprised |
| > if everythng just starts screaming in one go.. |
| |
| As it was found by someone before any non-journaling FS is faster than |
| journaling one. This due to double work done by FS and database. |
| |
| Try it on ext2 and compare. |
| |
| -- |
| Denis |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 11:12:48 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id E29E6476D79; Thu, 26 Sep 2002 11:12:47 -0400 (EDT) |
| Received: from new-smtp2.ihug.com.au (new-smtp2.ihug.com.au [203.109.250.28]) |
| by postgresql.org (Postfix) with ESMTP |
| id 1E9DC476D76; Thu, 26 Sep 2002 11:12:47 -0400 (EDT) |
| Received: from p407-tnt2.mel.ihug.com.au (postgresql.org) [203.173.165.153] |
| by new-smtp2.ihug.com.au with esmtp (Exim 3.22 #1 (Debian)) |
| id 17uaJu-00033K-00; Fri, 27 Sep 2002 01:12:50 +1000 |
| Message-ID: <3D9323F1.3A534EA8@postgresql.org> |
| Date: Fri, 27 Sep 2002 01:12:49 +1000 |
| From: Justin Clift <justin@postgresql.org> |
| X-Mailer: Mozilla 4.79 [en] (WinNT; U) |
| X-Accept-Language: en |
| MIME-Version: 1.0 |
| To: shridhar_daithankar@persistent.co.in, |
| PostgreSQL Performance Mailing List <pgsql-performance@postgresql.org> |
| Cc: PostgreSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgreSQL General Mailing List <pgsql-general@postgresql.org> |
| Subject: Re: Performance while loading data and indexing |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D936C6D.12380.14936AEC@localhost> |
| Content-Type: text/plain; charset=us-ascii |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1191 |
| X-Sequence-Number: 30772 |
| |
| Shridhar Daithankar wrote: |
| <snip> |
| > My friend argues for ext2 to eliminate journalling overhead but I favour |
| > reiserfs personally having used it in pgbench with 10M rows on paltry 20GB IDE |
| > disk for 25 tps.. |
| |
| If it's any help, the setup I mentioned before with differnt disks for |
| the data and the WAL files was getting an average of about 72 tps with |
| 200 concurrent users on pgbench. Haven't tuned it in a hard core way at |
| all, and it only has 256MB DDR RAM in it at the moment (single CPU |
| AthonXP 1600). These are figures made during the 2.5k+ test runs of |
| pgbench done when developing pg_autotune recently. |
| |
| As a curiosity point, how predictable are the queries you're going to be |
| running on your database? They sound very simple and very predicatable. |
|
|
| The pg_autotune tool might be your friend here. It can deal with |
| arbitrary SQL instead of using the pg_bench stuff of Tatsuos, and it can |
| also deal with an already loaded database. You'd just have to tweak the |
| names of the tables that it vacuums and the names of the indexes that it |
| reindexes between each run, to get some idea of your overall server |
| performance at different load points. |
| |
| Probably worth taking a good look at if you're not afraid of editing |
| variables in C code. :) |
| |
| > We will be attempting raiserfs and/or XFS if required. I know how much speed |
| > difference exists between resiserfs and ext2. Would not be surprised if |
| > everythng just starts screaming in one go.. |
|
|
| We'd all probably be interested to hear this. Added the PostgreSQL |
| "Performance" mailing list to this thread too, Just In Case. (wow that's |
| a lot of cross posting now). |
|
|
| Regards and best wishes, |
|
|
| Justin Clift |
| |
| > Bye |
| > Shridhar |
| > |
| > -- |
| > Cropp's Law: The amount of work done varies inversly with the time spent in the |
| > office. |
| > |
| > ---------------------------(end of broadcast)--------------------------- |
| > TIP 3: 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 |
| |
| -- |
| "My grandfather once told me that there are two kinds of people: those |
| who work and those who take the credit. He told me to try to be in the |
| first group; there was less competition there." |
| - Indira Gandhi |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 11:28:32 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 48544476CC6 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 11:28:30 -0400 (EDT) |
| Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) |
| by postgresql.org (Postfix) with ESMTP id 42D14476B61 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 11:28:28 -0400 (EDT) |
| Received: (from root@localhost) |
| by www.pspl.co.in (8.11.6/8.11.6) id g8QFTm217943 |
| for <pgsql-general@postgresql.org>; Thu, 26 Sep 2002 20:59:48 +0530 |
| Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) |
| by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g8QFTmv17928; |
| Thu, 26 Sep 2002 20:59:48 +0530 |
| From: "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> |
| To: PostgreSQL Performance Mailing List <pgsql-performance@postgresql.org> |
| Date: Thu, 26 Sep 2002 20:59:01 +0530 |
| MIME-Version: 1.0 |
| Subject: Re: Performance while loading data and indexing |
| Reply-To: shridhar_daithankar@persistent.co.in |
| Cc: PostgreSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgreSQL General Mailing List <pgsql-general@postgresql.org> |
| Message-ID: <3D937515.11546.14B53C07@localhost> |
| In-reply-to: <3D9323F1.3A534EA8@postgresql.org> |
| X-mailer: Pegasus Mail for Windows (v4.02) |
| Content-type: text/plain; charset=US-ASCII |
| Content-transfer-encoding: 7BIT |
| Content-description: Mail message body |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1193 |
| X-Sequence-Number: 30774 |
| |
| On 27 Sep 2002 at 1:12, Justin Clift wrote: |
| |
| > Shridhar Daithankar wrote: |
| > As a curiosity point, how predictable are the queries you're going to be |
| > running on your database? They sound very simple and very predicatable. |
|
|
| Mostly predictable selects. Not a domain expert on telecom so not very sure. |
| But in my guess prepare statement in 7.3 should come pretty handy. i.e. by the |
| time we finish evaluation and test deployment, 7.3 will be out in next couple |
| of months to say so. So I would recommend doing it 7.3 way only.. |
| > |
| > The pg_autotune tool might be your friend here. It can deal with |
| > arbitrary SQL instead of using the pg_bench stuff of Tatsuos, and it can |
| > also deal with an already loaded database. You'd just have to tweak the |
| > names of the tables that it vacuums and the names of the indexes that it |
| > reindexes between each run, to get some idea of your overall server |
| > performance at different load points. |
| > |
| > Probably worth taking a good look at if you're not afraid of editing |
| > variables in C code. :) |
|
|
| Gladly. We started with altering pgbench here for testing and rapidly settled |
| to perl generated random queries. Once postgresql wins the evaluation match and |
| things come to implementation, pg_autotune would be a handy tool. Just that |
| can't do it right now. Have to fight mysql and SAP DB before that.. |
| |
| BTW any performance figures on SAP DB? People here are as it frustrated with it |
| with difficulties in setting it up. But still.. |
| > |
| |
| > > We will be attempting raiserfs and/or XFS if required. I know how much speed |
| > > difference exists between resiserfs and ext2. Would not be surprised if |
| > > everythng just starts screaming in one go.. |
| > |
| > We'd all probably be interested to hear this. Added the PostgreSQL |
| > "Performance" mailing list to this thread too, Just In Case. (wow that's |
| > a lot of cross posting now). |
| |
| I know..;-) Glad that PG list does not have strict policies like no non- |
| subscriber posting or no attachments.. etc.. |
| |
| IMO reiserfs, though journalling one, is faster than ext2 etc. because the way |
| it handles metadata. Personally I haven't come across ext2 being faster than |
| reiserfs on few machine here for day to day use. |
|
|
| I guess I should have a freeBSD CD handy too.. Just to give it a try. If it |
| comes down to a better VM.. though using 2.4.19 here.. so souldn't matter |
| much.. |
| |
| I will keep you guys posted on file system stuff... Glad that we have much |
| flexibility with postgresql.. |
| |
| Bye |
| Shridhar |
| |
| -- |
| Bilbo's First Law: You cannot count friends that are all packed up in barrels. |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 11:41:47 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 26ED6476D61; Thu, 26 Sep 2002 11:41:46 -0400 (EDT) |
| Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net |
| [209.142.135.135]) by postgresql.org (Postfix) with ESMTP |
| id E26AF476D7B; Thu, 26 Sep 2002 11:41:44 -0400 (EDT) |
| Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net |
| [192.168.1.2]) |
| by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g8QFfWu10941; |
| Thu, 26 Sep 2002 10:41:32 -0500 (CDT) |
| X-Trade-Id: <CCC.Thu, 26 Sep 2002 10:41:32 -0500 (CDT).Thu, |
| 26 Sep 2002 10:41:32 -0500 |
| (CDT).200209261541.g8QFfWu10941.g8QFfWu10941@CopelandConsulting.Net. |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| From: Greg Copeland <greg@CopelandConsulting.Net> |
| To: shridhar_daithankar@persistent.co.in |
| Cc: PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <3D936C6D.12380.14936AEC@localhost> |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D936C6D.12380.14936AEC@localhost> |
| Content-Type: multipart/signed; micalg=pgp-sha1; |
| protocol="application/pgp-signature"; |
| boundary="=-u8SGzlKGiTZg+qY+QPln" |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 10:41:37 -0500 |
| Message-Id: <1033054898.17282.9.camel@mouse.copelandconsulting.net> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1196 |
| X-Sequence-Number: 30777 |
|
|
| --=-u8SGzlKGiTZg+qY+QPln |
| Content-Type: text/plain |
| Content-Transfer-Encoding: quoted-printable |
|
|
| On Thu, 2002-09-26 at 09:52, Shridhar Daithankar wrote: |
| > My friend argues for ext2 to eliminate journalling overhead but I favour= |
| =20 |
| > reiserfs personally having used it in pgbench with 10M rows on paltry 20G= |
| B IDE=20 |
| > disk for 25 tps.. |
| >=20 |
| > We will be attempting raiserfs and/or XFS if required. I know how much sp= |
| eed=20 |
| > difference exists between resiserfs and ext2. Would not be surprised if= |
| =20 |
| > everythng just starts screaming in one go.. |
| >=20 |
|
|
| I'm not sure about reiserfs or ext3 but with XFS, you can create your |
| log on another disk. Also worth noting is that you can also configure |
| the size and number of log buffers. There are also some other |
| performance type enhancements you can fiddle with if you don't mind |
| risking time stamp consistency in the event of a crash. If your setup |
| allows for it, you might want to consider using XFS in this |
| configuration. |
|
|
| While I have not personally tried moving XFS' log to another device, |
| I've heard that performance gains can be truly stellar. Assuming memory |
| allows, twiddling with the log buffering is said to allow for large |
| strides in performance as well. |
|
|
| If you do try this, I'd love to hear back about your results and |
| impressions. |
| |
| Greg |
| |
| |
| --=-u8SGzlKGiTZg+qY+QPln |
| Content-Type: application/pgp-signature; name=signature.asc |
| Content-Description: This is a digitally signed message part |
| |
| -----BEGIN PGP SIGNATURE----- |
| Version: GnuPG v1.0.7 (GNU/Linux) |
| |
| iD8DBQA9kyqx4lr1bpbcL6kRApydAJ46EfAEimKL7eDNSS7ZMdZlo3VptACfcPL0 |
| ByvQOwuqz/14LUVP1Oewjsk= |
| =VHX7 |
| -----END PGP SIGNATURE----- |
| |
| --=-u8SGzlKGiTZg+qY+QPln-- |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 12:42:01 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id F1D0F475E83; Thu, 26 Sep 2002 12:41:58 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id 3A9EB476EAE; Thu, 26 Sep 2002 12:41:55 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QGfYc04099; |
| Thu, 26 Sep 2002 12:41:34 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| Subject: Re: Performance while loading data and indexing |
| In-Reply-To: <3D936C6D.12380.14936AEC@localhost> |
| To: shridhar_daithankar@persistent.co.in |
| Date: Thu, 26 Sep 2002 12:41:34 -0400 (EDT) |
| Cc: pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1202 |
| X-Sequence-Number: 30783 |
| |
| Shridhar Daithankar wrote: |
| > I might have found the bottleneck, although by accident. Mysql was running out |
| > of space while creating index. So my friend shut down mysql and tried to move |
| > things by hand to create links. He noticed that even things like cp were |
| > terribly slow and it hit us.. May be the culprit is the file system. Ext3 in |
| > this case. |
| |
| I just added a file system and multi-cpu section to my performance |
| tuning paper: |
| |
| http://www.ca.postgresql.org/docs/momjian/hw_performance/ |
| |
| The paper does recommend ext3, but the differences between file systems |
| are very small. If you are seeing 'cp' as slow, I wonder if it may be |
| something more general, like poorly tuned hardware or something. You can |
| use 'dd' to throw some data around the file system and see if that is |
| showing slowness; compare those numbers to another machine that has |
| different hardware/OS. |
| |
| Also, though ext3 is slower, turning fsync off should make ext3 function |
| similar to ext2. That would be an interesting test if you suspect ext3. |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 13:17:12 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id E040F476E77; Thu, 26 Sep 2002 13:17:08 -0400 (EDT) |
| Received: from varsoon.wireboard.com (www.wireboard.com [216.151.155.101]) |
| by postgresql.org (Postfix) with ESMTP |
| id 8FF09476DFA; Thu, 26 Sep 2002 13:17:07 -0400 (EDT) |
| Received: from doug by varsoon.wireboard.com with local (Exim 3.35 #1) |
| id 17ucFg-0006dh-00; Thu, 26 Sep 2002 13:16:36 -0400 |
| To: Greg Copeland <greg@CopelandConsulting.Net> |
| From: Doug cNaught <doug@wireboard.com> |
| Cc: shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <3D931438.22010.133ADAFA@localhost> |
| <3D936C6D.12380.14936AEC@localhost> |
| <1033054898.17282.9.camel@mouse.copelandconsulting.net> |
| Date: 26 Sep 2002 13:16:36 -0400 |
| In-Reply-To: Greg Copeland's message of "26 Sep 2002 10:41:37 -0500" |
| Message-ID: <m34rcck6x7.fsf@varsoon.wireboard.com> |
| Lines: 25 |
| User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1206 |
| X-Sequence-Number: 30787 |
|
|
| Greg Copeland <greg@CopelandConsulting.Net> writes: |
|
|
| > I'm not sure about reiserfs or ext3 but with XFS, you can create your |
| > log on another disk. Also worth noting is that you can also configure |
| > the size and number of log buffers. There are also some other |
| > performance type enhancements you can fiddle with if you don't mind |
| > risking time stamp consistency in the event of a crash. If your setup |
| > allows for it, you might want to consider using XFS in this |
| > configuration. |
|
|
| You can definitely put the ext3 log on a different disk with 2.4 |
| kernels. |
|
|
| Also, if you put the WAL logs on a different disk from the main |
| database, and mount that partition with 'data=writeback' (ie |
| metadata-only journaling) ext3 should be pretty fast, since WAL files |
| are preallocated and there will therefore be almost no metadata |
| updates. |
|
|
| You should be able to mount the main database with "data=ordered" (the |
| default) for good performance and reasonable safety. |
|
|
| I think putting WAL on its own disk(s) is one of the keys here. |
|
|
| -Doug |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 14:14:21 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 8779F476D31; Thu, 26 Sep 2002 13:37:58 -0400 (EDT) |
| Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net |
| [209.142.135.135]) by postgresql.org (Postfix) with ESMTP |
| id 61C82476D2E; Thu, 26 Sep 2002 13:37:57 -0400 (EDT) |
| Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net |
| [192.168.1.2]) |
| by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g8QHapu12099; |
| Thu, 26 Sep 2002 12:36:51 -0500 (CDT) |
| X-Trade-Id: <CCC.Thu, 26 Sep 2002 12:36:51 -0500 (CDT).Thu, |
| 26 Sep 2002 12:36:51 -0500 |
| (CDT).200209261736.g8QHapu12099.g8QHapu12099@CopelandConsulting.Net. |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| From: Greg Copeland <greg@CopelandConsulting.Net> |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| References: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| Content-Type: multipart/signed; micalg=pgp-sha1; |
| protocol="application/pgp-signature"; |
| boundary="=-tyawsElsu3INch108LXq" |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 12:36:57 -0500 |
| Message-Id: <1033061818.23390.12.camel@mouse.copelandconsulting.net> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1208 |
| X-Sequence-Number: 30789 |
|
|
| --=-tyawsElsu3INch108LXq |
| Content-Type: text/plain |
| Content-Transfer-Encoding: quoted-printable |
|
|
| On Thu, 2002-09-26 at 11:41, Bruce Momjian wrote: |
| > Shridhar Daithankar wrote: |
| > > I might have found the bottleneck, although by accident. Mysql was runn= |
| ing out=20 |
| > > of space while creating index. So my friend shut down mysql and tried t= |
| o move=20 |
| > > things by hand to create links. He noticed that even things like cp wer= |
| e=20 |
| > > terribly slow and it hit us.. May be the culprit is the file system. Ex= |
| t3 in=20 |
| > > this case.=20 |
| >=20 |
| > I just added a file system and multi-cpu section to my performance |
| > tuning paper: |
| >=20 |
| > http://www.ca.postgresql.org/docs/momjian/hw_performance/ |
| >=20 |
| > The paper does recommend ext3, but the differences between file systems |
| > are very small. If you are seeing 'cp' as slow, I wonder if it may be |
| > something more general, like poorly tuned hardware or something. You can |
| > use 'dd' to throw some data around the file system and see if that is |
| > showing slowness; compare those numbers to another machine that has |
| > different hardware/OS. |
|
|
|
|
| That's a good point. Also, if you're using IDE, you do need to verify |
| that you're using DMA and proper PIO mode if at possible. Also, big |
| performance improvements can be seen by making sure your IDE bus speed |
| has been properly configured. The drivetweak-gtk and hdparm utilities |
| can make huge difference in performance. Just be sure you know what the |
| heck your doing when you mess with those. |
| |
| Greg |
| |
| |
| --=-tyawsElsu3INch108LXq |
| Content-Type: application/pgp-signature; name=signature.asc |
| Content-Description: This is a digitally signed message part |
| |
| -----BEGIN PGP SIGNATURE----- |
| Version: GnuPG v1.0.7 (GNU/Linux) |
| |
| iD8DBQA9k0W54lr1bpbcL6kRAsTSAJ410S530QfaeTjTxEaICSnzhUbNOwCeNGvr |
| tTGuXDVz190FH55un7vEjrc= |
| =HFjK |
| -----END PGP SIGNATURE----- |
| |
| --=-tyawsElsu3INch108LXq-- |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 14:13:31 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 27240476DA8; Thu, 26 Sep 2002 13:45:12 -0400 (EDT) |
| Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net |
| [209.142.135.135]) by postgresql.org (Postfix) with ESMTP |
| id D8262476D8F; Thu, 26 Sep 2002 13:45:10 -0400 (EDT) |
| Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net |
| [192.168.1.2]) |
| by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g8QHiGu14092; |
| Thu, 26 Sep 2002 12:44:16 -0500 (CDT) |
| X-Trade-Id: <CCC.Thu, 26 Sep 2002 12:44:16 -0500 (CDT).Thu, |
| 26 Sep 2002 12:44:16 -0500 |
| (CDT).200209261744.g8QHiGu14092.g8QHiGu14092@CopelandConsulting.Net. |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| From: Greg Copeland <greg@CopelandConsulting.Net> |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| References: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| Content-Type: multipart/signed; micalg=pgp-sha1; |
| protocol="application/pgp-signature"; |
| boundary="=-6mav3WK9RCaVOqe8tRq/" |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 12:44:22 -0500 |
| Message-Id: <1033062262.23475.16.camel@mouse.copelandconsulting.net> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1207 |
| X-Sequence-Number: 30788 |
| |
| --=-6mav3WK9RCaVOqe8tRq/ |
| Content-Type: text/plain |
| Content-Transfer-Encoding: quoted-printable |
| |
| On Thu, 2002-09-26 at 11:41, Bruce Momjian wrote: |
| > Shridhar Daithankar wrote: |
| > > I might have found the bottleneck, although by accident. Mysql was runn= |
| ing out=20 |
| > > of space while creating index. So my friend shut down mysql and tried t= |
| o move=20 |
| > > things by hand to create links. He noticed that even things like cp wer= |
| e=20 |
| > > terribly slow and it hit us.. May be the culprit is the file system. Ex= |
| t3 in=20 |
| > > this case.=20 |
| >=20 |
| > I just added a file system and multi-cpu section to my performance |
| > tuning paper: |
| >=20 |
| > http://www.ca.postgresql.org/docs/momjian/hw_performance/ |
| >=20 |
| > The paper does recommend ext3, but the differences between file systems |
| > are very small. If you are seeing 'cp' as slow, I wonder if it may be |
| > something more general, like poorly tuned hardware or something. You can |
| > use 'dd' to throw some data around the file system and see if that is |
| > showing slowness; compare those numbers to another machine that has |
| > different hardware/OS. |
| >=20 |
| > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > similar to ext2. That would be an interesting test if you suspect ext3. |
| |
| I'm curious as to why you recommended ext3 versus some other (JFS, |
| XFS). Do you have tests which validate that recommendation or was it a |
| simple matter of getting the warm fuzzies from familiarity? |
|
|
| Greg |
|
|
|
|
| --=-6mav3WK9RCaVOqe8tRq/ |
| Content-Type: application/pgp-signature; name=signature.asc |
| Content-Description: This is a digitally signed message part |
|
|
| -----BEGIN PGP SIGNATURE----- |
| Version: GnuPG v1.0.7 (GNU/Linux) |
|
|
| iD8DBQA9k0d24lr1bpbcL6kRAkGfAJ0en60jxkx1LsCX8HIzsjHgA8MnKQCffW/S |
| m+nGg6nihDZ/JABT4dNcuGo= |
| =Itl1 |
| -----END PGP SIGNATURE----- |
|
|
| --=-6mav3WK9RCaVOqe8tRq/-- |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 14:46:12 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 583924762C6; Thu, 26 Sep 2002 14:46:11 -0400 (EDT) |
| Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) |
| by postgresql.org (Postfix) with ESMTP |
| id 9179947606A; Thu, 26 Sep 2002 14:46:09 -0400 (EDT) |
| Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) |
| by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id g8QIjU0P015223; |
| Thu, 26 Sep 2002 12:45:30 -0600 (MDT) |
| Date: Thu, 26 Sep 2002 12:41:55 -0600 (MDT) |
| From: "scott.marlowe" <scott.marlowe@ihs.com> |
| To: Shridhar Daithankar <shridhar_daithankar@persistent.co.in> |
| Cc: <pgsql-hackers@postgresql.org>, <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <3D931882.31859.134B9E4C@localhost> |
| Message-ID: <Pine.LNX.4.33.0209261241070.7533-100000@css120.ihs.com> |
| MIME-Version: 1.0 |
| Content-Type: TEXT/PLAIN; charset=US-ASCII |
| X-MailBodyFilter: Message body has not been filtered |
| X-MailScanner: Found to be clean |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1209 |
| X-Sequence-Number: 30790 |
|
|
| If you are seeing very slow performance on a drive set, check dmesg to see |
| if you're getting SCSI bus errors or something similar. If your drives |
| aren't properly terminated then the performance will suffer a great deal. |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 16:01:20 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 09482476052; Thu, 26 Sep 2002 16:01:18 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id A0F8D474E5C; Thu, 26 Sep 2002 16:01:14 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QK0mG10553; |
| Thu, 26 Sep 2002 16:00:48 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262000.g8QK0mG10553@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <1033062262.23475.16.camel@mouse.copelandconsulting.net> |
| To: Greg Copeland <greg@copelandconsulting.net> |
| Date: Thu, 26 Sep 2002 16:00:48 -0400 (EDT) |
| Cc: shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Type: multipart/mixed; boundary=ELM1033070448-26881-0_ |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1211 |
| X-Sequence-Number: 30792 |
|
|
| --ELM1033070448-26881-0_ |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
|
|
| Greg Copeland wrote: |
| > > The paper does recommend ext3, but the differences between file systems |
| > > are very small. If you are seeing 'cp' as slow, I wonder if it may be |
| > > something more general, like poorly tuned hardware or something. You can |
| > > use 'dd' to throw some data around the file system and see if that is |
| > > showing slowness; compare those numbers to another machine that has |
| > > different hardware/OS. |
| > > |
| > > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > > similar to ext2. That would be an interesting test if you suspect ext3. |
| > |
| > I'm curious as to why you recommended ext3 versus some other (JFS, |
| > XFS). Do you have tests which validate that recommendation or was it a |
| > simple matter of getting the warm fuzzies from familiarity? |
| |
| I used the attached email as a reference. I just changed the wording to |
| be: |
| |
| File system choice is particularly difficult on Linux because there are |
| so many file system choices, and none of them are optimal: ext2 is not |
| entirely crash-safe, ext3 and xfs are journal-based, and Reiser is |
| optimized for small files. Fortunately, the journaling file systems |
| aren't significantly slower than ext2 so they are probably the best |
| choice. |
|
|
| so I don't specifically recommend ext3 anymore. As I remember, ext3 is |
| good only in that it can read ext2 file systems. I think XFS may be the |
| best bet. |
| |
| Can anyone clarify if "data=writeback" is safe for PostgreSQL. |
| Specifically, are the data files recovered properly or is this option |
| only for a filesystem containing WAL? |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| --ELM1033070448-26881-0_ |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain |
| Content-Disposition: inline; filename="/bjm/perf" |
| |
| |
| --ELM1033070448-26881-0_-- |
| From pgsql-general-owner@postgresql.org Thu Sep 26 16:42:13 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 5B9B147676D; Thu, 26 Sep 2002 16:42:12 -0400 (EDT) |
| Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) |
| by postgresql.org (Postfix) with ESMTP |
| id E1D784762B7; Thu, 26 Sep 2002 16:42:11 -0400 (EDT) |
| Received: from boston.samurai.com (DU179.N224.ResNet.QueensU.CA |
| [130.15.224.179]) by bob.samurai.com (Postfix) with ESMTP |
| id E9B1A1EAC; Thu, 26 Sep 2002 16:42:10 -0400 (EDT) |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| From: Neil Conway <neilc@samurai.com> |
| In-Reply-To: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| Date: 26 Sep 2002 16:41:49 -0400 |
| Message-ID: <871y7g1o1e.fsf@mailbox.samurai.com> |
| Lines: 20 |
| User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1212 |
| X-Sequence-Number: 30793 |
| |
| Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > The paper does recommend ext3, but the differences between file systems |
| > are very small. |
| |
| Well, I only did a very rough benchmark (a few runs of pgbench), but |
| the results I found were drastically different: ext2 was significantly |
| faster (~50%) than ext3-writeback, which was in turn significantly |
| faster (~25%) than ext3-ordered. |
| |
| > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > similar to ext2. |
| |
| Why would that be? |
| |
| Cheers, |
| |
| Neil |
| |
| -- |
| Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 16:46:10 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id AD961476147; Thu, 26 Sep 2002 16:46:07 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id C734B476052; Thu, 26 Sep 2002 16:46:05 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QKjtv21744; |
| Thu, 26 Sep 2002 16:45:55 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <871y7g1o1e.fsf@mailbox.samurai.com> |
| To: Neil Conway <neilc@samurai.com> |
| Date: Thu, 26 Sep 2002 16:45:54 -0400 (EDT) |
| Cc: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1213 |
| X-Sequence-Number: 30794 |
| |
| Neil Conway wrote: |
| > Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > > The paper does recommend ext3, but the differences between file systems |
| > > are very small. |
| > |
| > Well, I only did a very rough benchmark (a few runs of pgbench), but |
| > the results I found were drastically different: ext2 was significantly |
| > faster (~50%) than ext3-writeback, which was in turn significantly |
| > faster (~25%) than ext3-ordered. |
| |
| Wow. That leaves no good Linux file system alternatives. PostgreSQL |
| just wants an ordinary file system that has reliable recovery from a |
| crash. |
| |
| > > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > > similar to ext2. |
| > |
| > Why would that be? |
| |
| I assumed it was the double fsync for the normal and journal that made |
| the journalling file systems slog. |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-hackers-owner@postgresql.org Thu Sep 26 16:50:43 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 59D4D476083 |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 16:50:42 -0400 (EDT) |
| Received: from bachata.cybertec.at (unknown [62.116.21.146]) |
| by postgresql.org (Postfix) with SMTP id 1856E474E5C |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 16:50:41 -0400 (EDT) |
| Received: (qmail 26347 invoked from network); 26 Sep 2002 20:50:47 -0000 |
| Received: from unknown (HELO cybertec.at) (62.116.21.147) |
| by 62.116.21.146 with SMTP; 26 Sep 2002 20:50:47 -0000 |
| Message-ID: <3D937442.40902@cybertec.at> |
| Date: Thu, 26 Sep 2002 22:55:30 +0200 |
| From: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres@cybertec.at> |
| Reply-To: hs@cybertec.at |
| User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 |
| X-Accept-Language: en-us, en |
| MIME-Version: 1.0 |
| To: Neil Conway <neilc@samurai.com>, pgsql-hackers@postgresql.org |
| Subject: Re: [GENERAL] Performance while loading data and indexing |
| References: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| <871y7g1o1e.fsf@mailbox.samurai.com> |
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1576 |
| X-Sequence-Number: 29533 |
| |
| I have seen various benchmarks where XFS seems to perform best when it |
| comes to huge amounts of data and many files (due to balanced internal |
| b+ trees). |
| also, XFS seems to be VERY mature and very stable. |
| ext2/3 don't seem to be that fast in most of the benchmarks. |
|
|
| i did some testing with reiser some time ago. the problem is that it |
| seems to restore a very historic consistent snapshot of the data. XFS |
| seems to be much better in this respect. |
|
|
| i have not tested JFS yet (but on this damn AIX beside me) |
| from my point of view i strongly recommend XFS (maybe somebody from |
| RedHat should think about it). |
|
|
| Hans |
|
|
|
|
| Neil Conway wrote: |
|
|
| >Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > |
| > |
| >>The paper does recommend ext3, but the differences between file systems |
| >>are very small. |
| >> |
| >> |
| > |
| >Well, I only did a very rough benchmark (a few runs of pgbench), but |
| >the results I found were drastically different: ext2 was significantly |
| >faster (~50%) than ext3-writeback, which was in turn significantly |
| >faster (~25%) than ext3-ordered. |
| > |
| > |
| > |
| >>Also, though ext3 is slower, turning fsync off should make ext3 function |
| >>similar to ext2. |
| >> |
| >> |
| > |
| >Why would that be? |
| > |
| >Cheers, |
| > |
| >Neil |
| > |
| > |
| > |
|
|
|
|
| -- |
| *Cybertec Geschwinde u Schoenig* |
| Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria |
| Tel: +43/1/913 68 09; +43/664/233 90 75 |
| www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at |
| <http://cluster.postgresql.at>, www.cybertec.at |
| <http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at> |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 16:57:22 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id D2740476F59; Thu, 26 Sep 2002 16:57:21 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id AF1B947702E; Thu, 26 Sep 2002 16:57:14 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QKv3Z22867; |
| Thu, 26 Sep 2002 16:57:03 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262057.g8QKv3Z22867@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <871y7g1o1e.fsf@mailbox.samurai.com> |
| To: Neil Conway <neilc@samurai.com> |
| Date: Thu, 26 Sep 2002 16:57:03 -0400 (EDT) |
| Cc: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1215 |
| X-Sequence-Number: 30796 |
|
|
| Neil Conway wrote: |
| > Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > > The paper does recommend ext3, but the differences between file systems |
| > > are very small. |
| > |
| > Well, I only did a very rough benchmark (a few runs of pgbench), but |
| > the results I found were drastically different: ext2 was significantly |
| > faster (~50%) than ext3-writeback, which was in turn significantly |
| > faster (~25%) than ext3-ordered. |
| > |
| > > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > > similar to ext2. |
| > |
| > Why would that be? |
|
|
| OK, I changed the text to: |
| |
| File system choice is particularly difficult on Linux because there are |
| so many file system choices, and none of them are optimal: ext2 is not |
| entirely crash-safe, ext3, xfs, and jfs are journal-based, and Reiser is |
| optimized for small files and does journalling. The journalling file |
| systems can be significantly slower than ext2 but when crash recovery is |
| required, ext2 isn't an option. |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:03:41 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 8D545476FB9; Thu, 26 Sep 2002 17:03:40 -0400 (EDT) |
| Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) |
| by postgresql.org (Postfix) with ESMTP |
| id 1A27A476F86; Thu, 26 Sep 2002 17:03:40 -0400 (EDT) |
| Received: from boston.samurai.com (DU179.N224.ResNet.QueensU.CA |
| [130.15.224.179]) by bob.samurai.com (Postfix) with ESMTP |
| id 0015F1EAB; Thu, 26 Sep 2002 17:03:39 -0400 (EDT) |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: Neil Conway <neilc@samurai.com>, |
| shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org, |
| pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| From: Neil Conway <neilc@samurai.com> |
| In-Reply-To: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| Date: 26 Sep 2002 17:03:26 -0400 |
| Message-ID: <87vg4szco1.fsf@mailbox.samurai.com> |
| Lines: 29 |
| User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1217 |
| X-Sequence-Number: 30798 |
| |
| Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > Wow. That leaves no good Linux file system alternatives. |
| > PostgreSQL just wants an ordinary file system that has reliable |
| > recovery from a crash. |
| |
| I'm not really familiar with the reasoning behind ext2's reputation as |
| recovering poorly from crashes; if we fsync a WAL record to disk |
| before we lose power, can't we recover reliably, even with ext2? |
|
|
| > > > Also, though ext3 is slower, turning fsync off should make ext3 |
| > > > function similar to ext2. |
| > > |
| > > Why would that be? |
| > |
| > I assumed it was the double fsync for the normal and journal that |
| > made the journalling file systems slog. |
|
|
| Well, a journalling file system would need to write a journal entry |
| and flush that to disk, even if fsync is disabled -- whereas without |
| fsync enabled, ext2 doesn't have to flush anything to disk. ISTM that |
| the performance advantage of ext2 over ext3 is should be even larger |
| when fsync is not enabled. |
| |
| Cheers, |
| |
| Neil |
| |
| -- |
| Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC |
| |
| |
| From pgsql-hackers-owner@postgresql.org Thu Sep 26 17:04:07 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id CF22C477069 |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 17:04:06 -0400 (EDT) |
| Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net |
| [209.142.135.135]) |
| by postgresql.org (Postfix) with ESMTP id 9BEAA476C0B |
| for <pgsql-hackers@postgresql.org>; |
| Thu, 26 Sep 2002 17:03:54 -0400 (EDT) |
| Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net |
| [192.168.1.2]) |
| by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g8QL3hu15120; |
| Thu, 26 Sep 2002 16:03:44 -0500 (CDT) |
| X-Trade-Id: <CCC.Thu, 26 Sep 2002 16:03:44 -0500 (CDT).Thu, |
| 26 Sep 2002 16:03:44 -0500 |
| (CDT).200209262103.g8QL3hu15120.g8QL3hu15120@CopelandConsulting.Net. |
| Subject: Re: [GENERAL] Performance while loading data and indexing |
| From: Greg Copeland <greg@CopelandConsulting.Net> |
| To: hs@cybertec.at |
| Cc: PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org> |
| In-Reply-To: <3D937442.40902@cybertec.at> |
| References: <200209261641.g8QGfYc04099@candle.pha.pa.us> |
| <871y7g1o1e.fsf@mailbox.samurai.com> <3D937442.40902@cybertec.at> |
| Content-Type: multipart/signed; micalg=pgp-sha1; |
| protocol="application/pgp-signature"; |
| boundary="=-ZqXCINKzOxv8OZvLp8ID" |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 16:03:51 -0500 |
| Message-Id: <1033074232.23474.42.camel@mouse.copelandconsulting.net> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1582 |
| X-Sequence-Number: 29539 |
| |
| --=-ZqXCINKzOxv8OZvLp8ID |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: quoted-printable |
| |
| I tend to agree with this though I have nothing to back up it with. My |
| impression is that XFS does very well for large files. Accepting that |
| as fact?, my impression is that XFS historically does well for |
| database's. Again, I have nothing to back that up other than hear-say |
| and conjecture. |
|
|
| Greg |
|
|
|
|
| On Thu, 2002-09-26 at 15:55, Hans-J=FCrgen Sch=F6nig wrote: |
| > I have seen various benchmarks where XFS seems to perform best when it=20 |
| > comes to huge amounts of data and many files (due to balanced internal=20 |
| > b+ trees). |
| > also, XFS seems to be VERY mature and very stable. |
| > ext2/3 don't seem to be that fast in most of the benchmarks. |
| >=20 |
| > i did some testing with reiser some time ago. the problem is that it=20 |
| > seems to restore a very historic consistent snapshot of the data. XFS=20 |
| > seems to be much better in this respect. |
| >=20 |
| > i have not tested JFS yet (but on this damn AIX beside me) |
| > from my point of view i strongly recommend XFS (maybe somebody from=20 |
| > RedHat should think about it). |
| >=20 |
| > Hans |
| >=20 |
| >=20 |
| > Neil Conway wrote: |
| >=20 |
| > >Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > >=20=20 |
| > > |
| > >>The paper does recommend ext3, but the differences between file systems |
| > >>are very small. |
| > >>=20=20=20=20 |
| > >> |
| > > |
| > >Well, I only did a very rough benchmark (a few runs of pgbench), but |
| > >the results I found were drastically different: ext2 was significantly |
| > >faster (~50%) than ext3-writeback, which was in turn significantly |
| > >faster (~25%) than ext3-ordered. |
| > > |
| > >=20=20 |
| > > |
| > >>Also, though ext3 is slower, turning fsync off should make ext3 function |
| > >>similar to ext2. |
| > >>=20=20=20=20 |
| > >> |
| > > |
| > >Why would that be? |
| > > |
| > >Cheers, |
| > > |
| > >Neil |
| > > |
| > >=20=20 |
| > > |
| >=20 |
| >=20 |
| > --=20 |
| > *Cybertec Geschwinde u Schoenig* |
| > Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria |
| > Tel: +43/1/913 68 09; +43/664/233 90 75 |
| > www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at=20 |
| > <http://cluster.postgresql.at>, www.cybertec.at=20 |
| > <http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at> |
| >=20 |
| >=20 |
| > ---------------------------(end of broadcast)--------------------------- |
| > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |
| |
| |
| --=-ZqXCINKzOxv8OZvLp8ID |
| Content-Type: application/pgp-signature; name=signature.asc |
| Content-Description: This is a digitally signed message part |
| |
| -----BEGIN PGP SIGNATURE----- |
| Version: GnuPG v1.0.7 (GNU/Linux) |
| |
| iD8DBQA9k3Y34lr1bpbcL6kRAlvSAJ9DicilkkEypigomt/wfiO5nHyqqQCeOTHL |
| krIfkgUxrfgr50wh8oI93Lc= |
| =pUiE |
| -----END PGP SIGNATURE----- |
| |
| --=-ZqXCINKzOxv8OZvLp8ID-- |
| |
| |
| From pgsql-hackers-owner@postgresql.org Sat Sep 28 13:29:40 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id A7844476EEB; Thu, 26 Sep 2002 17:01:28 -0400 (EDT) |
| Received: from gatekeeper.d2000.com (gatekeeper.d2000.com [208.32.117.78]) |
| by postgresql.org (Postfix) with ESMTP |
| id AE297476E66; Thu, 26 Sep 2002 17:01:27 -0400 (EDT) |
| Received: (from bin@localhost) by gatekeeper.d2000.com (8.9.3/8.7.3) id |
| QAA41714; Thu, 26 Sep 2002 16:01:19 -0500 (CDT) |
| X-Authentication-Warning: gatekeeper.d2000.com: bin set sender to |
| <jmaes@materialogic.com> using -f |
| Received: from <jmaes@materialogic.com> (nt.d2000.com [205.164.66.20]) by |
| gatekeeper.d2000.com via smap (V2.1) |
| id xma041690; Thu, 26 Sep 02 16:00:47 -0500 |
| Received: from xl.d2000.com (unverified) by nt.d2000.com |
| (Content Technologies SMTPRS 4.1.5) with ESMTP id |
| <Tcda44214ef5d93590c53@nt.d2000.com>; |
| Thu, 26 Sep 2002 16:00:45 -0500 |
| Received: from materialpcow5r (backup.d2000.com [205.164.66.13]) by |
| xl.d2000.com (8.8.8/8.7.3) with SMTP id QAA05701; |
| Thu, 26 Sep 2002 16:00:33 -0500 (CDT) |
| From: "James Maes" <jmaes@materialogic.com> |
| To: "Bruce Momjian" <pgman@candle.pha.pa.us>, |
| "Neil Conway" <neilc@samurai.com> |
| Cc: <shridhar_daithankar@persistent.co.in>, |
| <pgsql-hackers@postgresql.org>, <pgsql-general@postgresql.org> |
| Subject: Re: [GENERAL] Performance while loading data and indexing |
| Date: Thu, 26 Sep 2002 16:06:07 -0500 |
| Message-ID: <LFEEKLFEBPEGCKMPLGPOOEBGDAAA.jmaes@materialogic.com> |
| MIME-Version: 1.0 |
| Content-Type: text/plain; |
| charset="us-ascii" |
| Content-Transfer-Encoding: 7bit |
| X-Priority: 3 (Normal) |
| X-MSMail-Priority: Normal |
| X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) |
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 |
| Importance: Normal |
| In-Reply-To: <200209262057.g8QKv3Z22867@candle.pha.pa.us> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1669 |
| X-Sequence-Number: 29626 |
| |
| Has there been any thought of providing RAW disk support to bypass the fs? |
| |
| -----Original Message----- |
| From: pgsql-hackers-owner@postgresql.org |
| [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Bruce Momjian |
| Sent: Thursday, September 26, 2002 3:57 PM |
| To: Neil Conway |
| Cc: shridhar_daithankar@persistent.co.in; pgsql-hackers@postgresql.org; |
| pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] [GENERAL] Performance while loading data and |
| indexing |
| |
| |
| Neil Conway wrote: |
| > Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > > The paper does recommend ext3, but the differences between file systems |
| > > are very small. |
| > |
| > Well, I only did a very rough benchmark (a few runs of pgbench), but |
| > the results I found were drastically different: ext2 was significantly |
| > faster (~50%) than ext3-writeback, which was in turn significantly |
| > faster (~25%) than ext3-ordered. |
| > |
| > > Also, though ext3 is slower, turning fsync off should make ext3 function |
| > > similar to ext2. |
| > |
| > Why would that be? |
| |
| OK, I changed the text to: |
| |
| File system choice is particularly difficult on Linux because there are |
| so many file system choices, and none of them are optimal: ext2 is not |
| entirely crash-safe, ext3, xfs, and jfs are journal-based, and Reiser is |
| optimized for small files and does journalling. The journalling file |
| systems can be significantly slower than ext2 but when crash recovery is |
| required, ext2 isn't an option. |
|
|
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
|
|
| ---------------------------(end of broadcast)--------------------------- |
| TIP 5: Have you checked our extensive FAQ? |
|
|
| http://www.postgresql.org/users-lounge/docs/faq.html |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:08:13 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 3B9ED4769E6; Thu, 26 Sep 2002 17:08:13 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id 2AD5C476241; Thu, 26 Sep 2002 17:08:11 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QL7vN25965; |
| Thu, 26 Sep 2002 17:07:57 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262107.g8QL7vN25965@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <87vg4szco1.fsf@mailbox.samurai.com> |
| To: Neil Conway <neilc@samurai.com> |
| Date: Thu, 26 Sep 2002 17:07:57 -0400 (EDT) |
| Cc: shridhar_daithankar@persistent.co.in, |
| pgsql-hackers@postgresql.org, pgsql-general@postgresql.org |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1218 |
| X-Sequence-Number: 30799 |
|
|
| Neil Conway wrote: |
| > Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > > Wow. That leaves no good Linux file system alternatives. |
| > > PostgreSQL just wants an ordinary file system that has reliable |
| > > recovery from a crash. |
| > |
| > I'm not really familiar with the reasoning behind ext2's reputation as |
| > recovering poorly from crashes; if we fsync a WAL record to disk |
| > before we lose power, can't we recover reliably, even with ext2? |
| > |
| > > > > Also, though ext3 is slower, turning fsync off should make ext3 |
| > > > > function similar to ext2. |
| > > > |
| > > > Why would that be? |
| > > |
| > > I assumed it was the double fsync for the normal and journal that |
| > > made the journalling file systems slog. |
| > |
| > Well, a journalling file system would need to write a journal entry |
| > and flush that to disk, even if fsync is disabled -- whereas without |
| > fsync enabled, ext2 doesn't have to flush anything to disk. ISTM that |
| > the performance advantage of ext2 over ext3 is should be even larger |
| > when fsync is not enabled. |
|
|
| Yes, it is still double-writing. I just thought that if that wasn't |
| happening while the db was waiting for a commit that it wouldn't be too |
| bad. |
|
|
| Is it just me or do all the Linux file systems seem like they are |
| lacking something when PostgreSQL is concerned? We just want a UFS-like |
| file system on Linux and no one has it. |
|
|
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:09:32 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 4AD7A476FCC; Thu, 26 Sep 2002 17:09:31 -0400 (EDT) |
| Received: from CopelandConsulting.Net (dsl-24293-ld.customer.centurytel.net |
| [209.142.135.135]) by postgresql.org (Postfix) with ESMTP |
| id 22CE6476FC8; Thu, 26 Sep 2002 17:09:30 -0400 (EDT) |
| Received: from mouse.copelandconsulting.net (mouse.copelandconsulting.net |
| [192.168.1.2]) |
| by CopelandConsulting.Net (8.10.1/8.10.1) with ESMTP id g8QL97u03616; |
| Thu, 26 Sep 2002 16:09:07 -0500 (CDT) |
| X-Trade-Id: <CCC.Thu, 26 Sep 2002 16:09:07 -0500 (CDT).Thu, |
| 26 Sep 2002 16:09:07 -0500 |
| (CDT).200209262109.g8QL97u03616.g8QL97u03616@CopelandConsulting.Net. |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| From: Greg Copeland <greg@CopelandConsulting.Net> |
| To: Neil Conway <neilc@samurai.com> |
| Cc: Bruce Momjian <pgman@candle.pha.pa.us>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <87vg4szco1.fsf@mailbox.samurai.com> |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| <87vg4szco1.fsf@mailbox.samurai.com> |
| Content-Type: multipart/signed; micalg=pgp-sha1; |
| protocol="application/pgp-signature"; |
| boundary="=-ukBN/VLqUCvLMvEd/iTv" |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 16:09:15 -0500 |
| Message-Id: <1033074555.23344.48.camel@mouse.copelandconsulting.net> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1219 |
| X-Sequence-Number: 30800 |
|
|
| --=-ukBN/VLqUCvLMvEd/iTv |
| Content-Type: text/plain |
| Content-Transfer-Encoding: quoted-printable |
|
|
| On Thu, 2002-09-26 at 16:03, Neil Conway wrote: |
| > Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| > > Wow. That leaves no good Linux file system alternatives. |
| > > PostgreSQL just wants an ordinary file system that has reliable |
| > > recovery from a crash. |
| >=20 |
| > I'm not really familiar with the reasoning behind ext2's reputation as |
| > recovering poorly from crashes; if we fsync a WAL record to disk |
| > before we lose power, can't we recover reliably, even with ext2? |
| |
| Well, I have experienced data loss from ext2 before. Also, recovery |
| from crashes on large file systems take a very, very long time. I can't |
| imagine anyone running a production database on an ext2 file system |
| having 10's or even 100's of GB. Ouch. Recovery would take forever!=20 |
| Even recovery on small file systems (2-8G) can take extended periods of |
| time. Especially so on IDE systems. Even then manual intervention is |
| not uncommon. |
|
|
| While I can't say that x, y or z is the best FS to use on Linux, I can |
| say that ext2 is probably an exceptionally poor choice from a |
| reliability and/or uptime perspective. |
| |
| Greg |
| |
| |
| --=-ukBN/VLqUCvLMvEd/iTv |
| Content-Type: application/pgp-signature; name=signature.asc |
| Content-Description: This is a digitally signed message part |
| |
| -----BEGIN PGP SIGNATURE----- |
| Version: GnuPG v1.0.7 (GNU/Linux) |
| |
| iD8DBQA9k3d74lr1bpbcL6kRAttbAJ44dhAlrsYjtTfGuieCrbJBqLV7PwCfWElV |
| QDa/ABmzxCPU/REOuseR7bo= |
| =Sg1u |
| -----END PGP SIGNATURE----- |
| |
| --=-ukBN/VLqUCvLMvEd/iTv-- |
| |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:17:43 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 4E5B1474E5C; Thu, 26 Sep 2002 17:17:42 -0400 (EDT) |
| Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) |
| by postgresql.org (Postfix) with ESMTP |
| id 3C927476F34; Thu, 26 Sep 2002 17:17:41 -0400 (EDT) |
| Received: from boston.samurai.com (DU179.N224.ResNet.QueensU.CA |
| [130.15.224.179]) by bob.samurai.com (Postfix) with ESMTP |
| id 066721ECE; Thu, 26 Sep 2002 17:17:42 -0400 (EDT) |
| To: Greg Copeland <greg@CopelandConsulting.Net> |
| Cc: Neil Conway <neilc@samurai.com>, Bruce Momjian <pgman@candle.pha.pa.us>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| <87vg4szco1.fsf@mailbox.samurai.com> |
| <1033074555.23344.48.camel@mouse.copelandconsulting.net> |
| From: Neil Conway <neilc@samurai.com> |
| In-Reply-To: <1033074555.23344.48.camel@mouse.copelandconsulting.net> |
| Date: 26 Sep 2002 17:17:30 -0400 |
| Message-ID: <87n0q4zc0l.fsf@mailbox.samurai.com> |
| Lines: 24 |
| User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1220 |
| X-Sequence-Number: 30801 |
| |
| Greg Copeland <greg@CopelandConsulting.Net> writes: |
| > On Thu, 2002-09-26 at 16:03, Neil Conway wrote: |
| > > I'm not really familiar with the reasoning behind ext2's |
| > > reputation as recovering poorly from crashes; if we fsync a WAL |
| > > record to disk before we lose power, can't we recover reliably, |
| > > even with ext2? |
| > |
| > Well, I have experienced data loss from ext2 before. Also, recovery |
| > from crashes on large file systems take a very, very long time. |
|
|
| Yes, but wouldn't you face exactly the same issues if you ran a |
| UFS-like filesystem in asynchronous mode? Albeit it's not the default, |
| but performance in synchronous mode is usually pretty poor. |
|
|
| The fact that ext2 defaults to asynchronous mode and UFS (at least on |
| the BSDs) defaults to synchronous mode seems like a total non-issue to |
| me. Is there any more to the alleged difference in reliability? |
|
|
| Cheers, |
|
|
| Neil |
|
|
| -- |
| Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:32:17 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 938DE4769BA; Thu, 26 Sep 2002 17:32:15 -0400 (EDT) |
| Received: from varsoon.wireboard.com (www.wireboard.com [216.151.155.101]) |
| by postgresql.org (Postfix) with ESMTP |
| id 0DC964769AE; Thu, 26 Sep 2002 17:32:15 -0400 (EDT) |
| Received: from doug by varsoon.wireboard.com with local (Exim 3.35 |
| id 17ugEl-0006nF-00; Thu, 26 Sep 2002 17:31:55 -0400 |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| From: Doug McNaught <doug@wireboard.com> |
| Cc: Greg Copeland <greg@copelandconsulting.net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209262000.g8QK0mG10553@candle.pha.pa.us> |
| Date: 26 Sep 2002 17:31:55 -0400 |
| In-Reply-To: Bruce Momjian's message of "Thu, |
| 26 Sep 2002 16:00:48 -0400 (EDT)" |
| Message-ID: <m3znu4igj8.fsf@varsoon.wireboard.com> |
| Lines: 24 |
| User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1221 |
| X-Sequence-Number: 30802 |
| |
| Bruce Momjian <pgman@candle.pha.pa.us> writes: |
| |
| > Can anyone clarify if "data=writeback" is safe for PostgreSQL. |
| > Specifically, are the data files recovered properly or is this option |
| > only for a filesystem containing WAL? |
| |
| "data=writeback" means that no data is journaled, just metadata (which |
| is like XFS or Reiser). An fsync() call should still do what it |
| normally does, commit the writes to disk before returning. |
| |
| "data=journal" journals all data and is the slowest and safest. |
| "data=ordered" writes out data blocks before committing a journal |
| transaction, which is faster than full data journaling (since data |
| doesn't get written twice) and almost as safe. "data=writeback" is |
| noted to keep obsolete data in the case of some crashes (since the |
| data may not have been written yet) but a completed fsync() should |
| ensure that the data is valid. |
|
|
| So I guess I'd probably use data=ordered for an all-on-one-fs |
| installation, and data=writeback for a WAL-only drive. |
| |
| Hope this helps... |
| |
| -Doug |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:32:39 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 9C0C4477044 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 17:32:38 -0400 (EDT) |
| Received: from sss.pgh.pa.us (unknown [192.204.191.242]) |
| by postgresql.org (Postfix) with ESMTP id 591CA476F89 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 17:32:26 -0400 (EDT) |
| Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) |
| by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8QLW1hR012931; |
| Thu, 26 Sep 2002 17:32:01 -0400 (EDT) |
| To: Neil Conway <neilc@samurai.com> |
| Cc: Bruce Momjian <pgman@candle.pha.pa.us>, |
| shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org, |
| pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-reply-to: <87vg4szco1.fsf@mailbox.samurai.com> |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| <87vg4szco1.fsf@mailbox.samurai.com> |
| Comments: In-reply-to Neil Conway <neilc@samurai.com> |
| message dated "26 Sep 2002 17:03:26 -0400" |
| Date: Thu, 26 Sep 2002 17:32:01 -0400 |
| Message-ID: <12930.1033075921@sss.pgh.pa.us> |
| From: Tom Lane <tgl@sss.pgh.pa.us> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1222 |
| X-Sequence-Number: 30803 |
| |
| Neil Conway <neilc@samurai.com> writes: |
| > I'm not really familiar with the reasoning behind ext2's reputation as |
| > recovering poorly from crashes; if we fsync a WAL record to disk |
| > before we lose power, can't we recover reliably, even with ext2? |
|
|
| Up to a point. We do assume that the filesystem won't lose checkpointed |
| (sync'd) writes to data files. To the extent that the filesystem is |
| vulnerable to corruption of its own metadata for a file (indirect blocks |
| or whatever ext2 uses), that's not a completely safe assumption. |
| |
| We'd be happiest with a filesystem that journals its own metadata and |
| not the user data in the file(s). I dunno if there are any. |
|
|
| Hmm, maybe this is why Oracle likes doing their own filesystem on a raw |
| device... |
|
|
| regards, tom lane |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:37:39 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id F267E476FCC; Thu, 26 Sep 2002 17:37:38 -0400 (EDT) |
| Received: from varsoon.wireboard.com (www.wireboard.com [216.151.155.101]) |
| by postgresql.org (Postfix) with ESMTP |
| id 1DF13476FC3; Thu, 26 Sep 2002 17:37:38 -0400 (EDT) |
| Received: from doug by varsoon.wireboard.com with local (Exim 3.35 |
| id 17ugJq-0006nf-00; Thu, 26 Sep 2002 17:37:10 -0400 |
| To: Tom Lane <tgl@sss.pgh.pa.us> |
| From: Doug McNaught <doug@wireboard.com> |
| Cc: Neil Conway <neilc@samurai.com>, Bruce Momjian <pgman@candle.pha.pa.us>, |
| shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org, |
| pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| <87vg4szco1.fsf@mailbox.samurai.com> <12930.1033075921@sss.pgh.pa.us> |
| Date: 26 Sep 2002 17:37:10 -0400 |
| In-Reply-To: Tom Lane's message of "Thu, 26 Sep 2002 17:32:01 -0400" |
| Message-ID: <m3vg4sigah.fsf@varsoon.wireboard.com> |
| Lines: 8 |
| User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1223 |
| X-Sequence-Number: 30804 |
| |
| Tom Lane <tgl@sss.pgh.pa.us> writes: |
| |
| > We'd be happiest with a filesystem that journals its own metadata and |
| > not the user data in the file(s). I dunno if there are any. |
|
|
| ext3 with data=writeback? (See my previous message to Bruce). |
|
|
| -Doug |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:39:35 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 0C3B54760BD; Thu, 26 Sep 2002 17:39:35 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id 7E8AC4770C8; Thu, 26 Sep 2002 17:39:31 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QLdEE08861; |
| Thu, 26 Sep 2002 17:39:14 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262139.g8QLdEE08861@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <87n0q4zc0l.fsf@mailbox.samurai.com> |
| To: Neil Conway <neilc@samurai.com> |
| Date: Thu, 26 Sep 2002 17:39:14 -0400 (EDT) |
| Cc: Greg Copeland <greg@CopelandConsulting.Net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1224 |
| X-Sequence-Number: 30805 |
|
|
| Neil Conway wrote: |
| > Greg Copeland <greg@CopelandConsulting.Net> writes: |
| > > On Thu, 2002-09-26 at 16:03, Neil Conway wrote: |
| > > > I'm not really familiar with the reasoning behind ext2's |
| > > > reputation as recovering poorly from crashes; if we fsync a WAL |
| > > > record to disk before we lose power, can't we recover reliably, |
| > > > even with ext2? |
| > > |
| > > Well, I have experienced data loss from ext2 before. Also, recovery |
| > > from crashes on large file systems take a very, very long time. |
| > |
| > Yes, but wouldn't you face exactly the same issues if you ran a |
| > UFS-like filesystem in asynchronous mode? Albeit it's not the default, |
| > but performance in synchronous mode is usually pretty poor. |
| |
| Yes, before UFS had soft updates, the synchronous nature of UFS made it |
| slower than ext2, but now with soft updates, that performance difference |
| is gone so you have two files systems, ext2 and ufs, similar peformance, |
| but one is crash-safe and the other is not. |
| |
| And, when comparing the journalling file systems, you have UFS vs. |
| XFS/ext3/JFS/Reiser, and UFS is faster. The only thing the journalling |
| file system give you is more rapid reboot, but frankly, if your OS goes |
| down often enough so that is an issue, you have bigger problems than |
| fsync time. |
| |
| The big problem is that Linux went from non-crash safe right to |
| crash-safe and reboot quick. We need a middle ground, which is where |
| UFS/soft updates is. |
| |
| > The fact that ext2 defaults to asynchronous mode and UFS (at least on |
| > the BSDs) defaults to synchronous mode seems like a total non-issue to |
| > me. Is there any more to the alleged difference in reliability? |
| |
| The reliability problem isn't alleged. ext2 developers admits ext2 |
| isn't 100% crash-safe. They will say it is usually crash-safe, but that |
| isn't good enough for PostgreSQL. |
|
|
| I wish I was wrong. |
|
|
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:42:05 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 969E9476FEF; Thu, 26 Sep 2002 17:42:02 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id 97422476FDB; Thu, 26 Sep 2002 17:42:00 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QLfMr09064; |
| Thu, 26 Sep 2002 17:41:22 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262141.g8QLfMr09064@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <m3vg4sigah.fsf@varsoon.wireboard.com> |
| To: Doug McNaught <doug@wireboard.com> |
| Date: Thu, 26 Sep 2002 17:41:22 -0400 (EDT) |
| Cc: Tom Lane <tgl@sss.pgh.pa.us>, Neil Conway <neilc@samurai.com>, |
| shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org, |
| pgsql-general@postgresql.org |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1225 |
| X-Sequence-Number: 30806 |
|
|
| Doug McNaught wrote: |
| > Tom Lane <tgl@sss.pgh.pa.us> writes: |
| > |
| > > We'd be happiest with a filesystem that journals its own metadata and |
| > > not the user data in the file(s). I dunno if there are any. |
| > |
| > ext3 with data=writeback? (See my previous message to Bruce). |
| |
| OK, so that makes ext3 crash safe without lots of overhead? |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-hackers-owner@postgresql.org Thu Sep 26 17:45:16 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 460CF477047; Thu, 26 Sep 2002 17:45:14 -0400 (EDT) |
| Received: from squire.barchord.com (squire.barchord.com [216.194.67.18]) |
| by postgresql.org (Postfix) with ESMTP |
| id CA66D477042; Thu, 26 Sep 2002 17:45:13 -0400 (EDT) |
| Received: from [192.168.1.253] |
| (CPE00508b028d7d-CM00803785c5e0.cpe.net.cable.rogers.com |
| [24.103.51.175]) by squire.barchord.com (Postfix) with ESMTP |
| id 454C542C; Thu, 26 Sep 2002 17:45:15 -0400 (EDT) |
| Subject: Re: [GENERAL] Performance while loading data and indexing |
| From: Rod Taylor <rbt@rbt.ca> |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: Neil Conway <neilc@samurai.com>, |
| Greg Copeland <greg@CopelandConsulting.Net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <200209262139.g8QLdEE08861@candle.pha.pa.us> |
| References: <200209262139.g8QLdEE08861@candle.pha.pa.us> |
| Content-Type: text/plain |
| Content-Transfer-Encoding: 7bit |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 17:45:23 -0400 |
| Message-Id: <1033076723.27772.4.camel@jester> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1598 |
| X-Sequence-Number: 29555 |
| |
| On Thu, 2002-09-26 at 17:39, Bruce Momjian wrote: |
| > Neil Conway wrote: |
| > > Greg Copeland <greg@CopelandConsulting.Net> writes: |
| > > > On Thu, 2002-09-26 at 16:03, Neil Conway wrote: |
| > > > > I'm not really familiar with the reasoning behind ext2's |
| > > > > reputation as recovering poorly from crashes; if we fsync a WAL |
| > > > > record to disk before we lose power, can't we recover reliably, |
| > > > > even with ext2? |
| > > > |
| > > > Well, I have experienced data loss from ext2 before. Also, recovery |
| > > > from crashes on large file systems take a very, very long time. |
| > > |
| > > Yes, but wouldn't you face exactly the same issues if you ran a |
| > > UFS-like filesystem in asynchronous mode? Albeit it's not the default, |
| > > but performance in synchronous mode is usually pretty poor. |
| > |
| > Yes, before UFS had soft updates, the synchronous nature of UFS made it |
| > slower than ext2, but now with soft updates, that performance difference |
| > is gone so you have two files systems, ext2 and ufs, similar peformance, |
| > but one is crash-safe and the other is not. |
|
|
| Note entirely true. ufs is both crash-safe and quick-rebootable. You |
| do need to fsck at some point, but not prior to mounting it. Any |
| corrupt blocks are empty, and are easy to avoid. |
|
|
| Someone just needs to implement a background fsck that will run on a |
| mounted filesystem. |
|
|
| -- |
| Rod Taylor |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 17:48:03 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 42A774767DA; Thu, 26 Sep 2002 17:48:03 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id 5FC1E476212; Thu, 26 Sep 2002 17:48:01 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QLlhU10159; |
| Thu, 26 Sep 2002 17:47:43 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262147.g8QLlhU10159@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <1033076723.27772.4.camel@jester> |
| To: Rod Taylor <rbt@rbt.ca> |
| Date: Thu, 26 Sep 2002 17:47:43 -0400 (EDT) |
| Cc: Neil Conway <neilc@samurai.com>, |
| Greg Copeland <greg@CopelandConsulting.Net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1227 |
| X-Sequence-Number: 30808 |
|
|
| Rod Taylor wrote: |
| > > Yes, before UFS had soft updates, the synchronous nature of UFS made it |
| > > slower than ext2, but now with soft updates, that performance difference |
| > > is gone so you have two files systems, ext2 and ufs, similar peformance, |
| > > but one is crash-safe and the other is not. |
| > |
| > Note entirely true. ufs is both crash-safe and quick-rebootable. You |
| > do need to fsck at some point, but not prior to mounting it. Any |
| > corrupt blocks are empty, and are easy to avoid. |
|
|
| I am assuming you need to mount the drive as part of the reboot. Of |
| course you can boot fast with any file system if you don't have to mount |
| it. :-) |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-general-owner@postgresql.org Sat Sep 28 13:41:23 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 991FA47618E; Thu, 26 Sep 2002 18:03:27 -0400 (EDT) |
| Received: from squire.barchord.com (squire.barchord.com [216.194.67.18]) |
| by postgresql.org (Postfix) with ESMTP |
| id 221B74760B7; Thu, 26 Sep 2002 18:03:27 -0400 (EDT) |
| Received: from [192.168.1.253] |
| (CPE00508b028d7d-CM00803785c5e0.cpe.net.cable.rogers.com |
| [24.103.51.175]) by squire.barchord.com (Postfix) with ESMTP |
| id 8ECED42C; Thu, 26 Sep 2002 18:03:28 -0400 (EDT) |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| From: Rod Taylor <rbt@rbt.ca> |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: Neil Conway <neilc@samurai.com>, |
| Greg Copeland <greg@CopelandConsulting.Net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| In-Reply-To: <200209262147.g8QLlhU10159@candle.pha.pa.us> |
| References: <200209262147.g8QLlhU10159@candle.pha.pa.us> |
| Content-Type: text/plain |
| Content-Transfer-Encoding: 7bit |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 26 Sep 2002 18:03:36 -0400 |
| Message-Id: <1033077816.27772.9.camel@jester> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1330 |
| X-Sequence-Number: 30911 |
| |
| On Thu, 2002-09-26 at 17:47, Bruce Momjian wrote: |
| > Rod Taylor wrote: |
| > > > Yes, before UFS had soft updates, the synchronous nature of UFS made it |
| > > > slower than ext2, but now with soft updates, that performance difference |
| > > > is gone so you have two files systems, ext2 and ufs, similar peformance, |
| > > > but one is crash-safe and the other is not. |
| > > |
| > > Note entirely true. ufs is both crash-safe and quick-rebootable. You |
| > > do need to fsck at some point, but not prior to mounting it. Any |
| > > corrupt blocks are empty, and are easy to avoid. |
| > |
| > I am assuming you need to mount the drive as part of the reboot. Of |
| > course you can boot fast with any file system if you don't have to mount |
| > it. :-) |
|
|
| Sorry, poor explanation. |
|
|
| Background fsck (when implemented) would operate on a currently mounted |
| (and active) file system. The only reason fsck is required prior to |
| reboot now is because no-one had done the work. |
|
|
| http://www.freebsd.org/cgi/man.cgi?query=fsck&sektion=8&manpath=FreeBSD+5.0-current |
|
|
| See the first paragraph of the above. |
| -- |
| Rod Taylor |
|
|
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 18:05:13 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id C0E5F476FAF; Thu, 26 Sep 2002 18:05:12 -0400 (EDT) |
| Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) |
| by postgresql.org (Postfix) with ESMTP |
| id C71D6476F95; Thu, 26 Sep 2002 18:05:10 -0400 (EDT) |
| Received: (from pgman@localhost) |
| by candle.pha.pa.us (8.11.6/8.10.1) id g8QM4qX11641; |
| Thu, 26 Sep 2002 18:04:52 -0400 (EDT) |
| From: Bruce Momjian <pgman@candle.pha.pa.us> |
| Message-Id: <200209262204.g8QM4qX11641@candle.pha.pa.us> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <1033077816.27772.9.camel@jester> |
| To: Rod Taylor <rbt@rbt.ca> |
| Date: Thu, 26 Sep 2002 18:04:52 -0400 (EDT) |
| Cc: Neil Conway <neilc@samurai.com>, |
| Greg Copeland <greg@CopelandConsulting.Net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| X-Mailer: ELM [version 2.4ME+ PL99 (25)] |
| MIME-Version: 1.0 |
| Content-Transfer-Encoding: 7bit |
| Content-Type: text/plain; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1229 |
| X-Sequence-Number: 30810 |
|
|
| Rod Taylor wrote: |
| > On Thu, 2002-09-26 at 17:47, Bruce Momjian wrote: |
| > > Rod Taylor wrote: |
| > > > > Yes, before UFS had soft updates, the synchronous nature of UFS made it |
| > > > > slower than ext2, but now with soft updates, that performance difference |
| > > > > is gone so you have two files systems, ext2 and ufs, similar peformance, |
| > > > > but one is crash-safe and the other is not. |
| > > > |
| > > > Note entirely true. ufs is both crash-safe and quick-rebootable. You |
| > > > do need to fsck at some point, but not prior to mounting it. Any |
| > > > corrupt blocks are empty, and are easy to avoid. |
| > > |
| > > I am assuming you need to mount the drive as part of the reboot. Of |
| > > course you can boot fast with any file system if you don't have to mount |
| > > it. :-) |
| > |
| > Sorry, poor explanation. |
| > |
| > Background fsck (when implemented) would operate on a currently mounted |
| > (and active) file system. The only reason fsck is required prior to |
| > reboot now is because no-one had done the work. |
| > |
| > http://www.freebsd.org/cgi/man.cgi?query=fsck&sektion=8&manpath=FreeBSD+5.0-current |
| > |
| > See the first paragraph of the above. |
| |
| Oh, yes, I have heard of that missing feature. |
| |
| -- |
| Bruce Momjian | http://candle.pha.pa.us |
| pgman@candle.pha.pa.us | (610) 359-1001 |
| + If your life is a hard drive, | 13 Roberts Road |
| + Christ can be your backup. | Newtown Square, Pennsylvania 19073 |
| |
| From pgsql-general-owner@postgresql.org Thu Sep 26 19:26:22 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id 625C74763DD; Thu, 26 Sep 2002 19:26:21 -0400 (EDT) |
| Received: from varsoon.wireboard.com (www.wireboard.com [216.151.155.101]) |
| by postgresql.org (Postfix) with ESMTP |
| id C8EF147628D; Thu, 26 Sep 2002 19:26:20 -0400 (EDT) |
| Received: from doug by varsoon.wireboard.com with local (Exim 3.35 #1) |
| id 17ui1D-0006sX-00; Thu, 26 Sep 2002 19:26:03 -0400 |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| From: Doug McNaught <doug@wireboard.com> |
| Cc: Tom Lane <tgl@sss.pgh.pa.us>, Neil Conway <neilc@samurai.com>, |
| shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org, |
| pgsql-general@postgresql.org |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| References: <200209262141.g8QLfMr09064@candle.pha.pa.us> |
| Date: 26 Sep 2002 19:26:03 -0400 |
| In-Reply-To: Bruce Momjian's message of "Thu, |
| 26 Sep 2002 17:41:22 -0400 (EDT)" |
| Message-ID: <m3ptv0ib90.fsf@varsoon.wireboard.com> |
| Lines: 23 |
| User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1231 |
| X-Sequence-Number: 30812 |
|
|
| Bruce Momjian <pgman@candle.pha.pa.us> writes: |
|
|
| > Doug McNaught wrote: |
| > > Tom Lane <tgl@sss.pgh.pa.us> writes: |
| > > |
| > > > We'd be happiest with a filesystem that journals its own metadata and |
| > > > not the user data in the file(s). I dunno if there are any. |
| > > |
| > > ext3 with data=writeback? (See my previous message to Bruce). |
| > |
| > OK, so that makes ext3 crash safe without lots of overhead? |
| |
| Metadata is journaled so you shouldn't lose data blocks or directory |
| entries. Some data blocks (that haven't been fsync()'ed) may have old |
| or wrong data in them, but I think that's the same as ufs, right? And |
| WAL replay should take care of that. |
| |
| It'd be very interesting to do some tests of the various journaling |
| modes. I have an old K6 that I might be able to turn into a |
| hit-the-reset-switch-at-ramdom-times machine. What kind of tests |
| should be run? |
|
|
| -Doug |
|
|
| From pgsql-performance-owner@postgresql.org Thu Sep 26 22:53:21 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 353A4476391 |
| for <pgsql-performance@postgresql.org>; |
| Thu, 26 Sep 2002 22:53:21 -0400 (EDT) |
| Received: from corpmail.outblaze.com (202-77-223-51.outblaze.com |
| [202.77.223.51]) |
| by postgresql.org (Postfix) with ESMTP id D37A247632D |
| for <pgsql-performance@postgresql.org>; |
| Thu, 26 Sep 2002 22:53:19 -0400 (EDT) |
| Received: from yusufg.portal2.com (202-77-223-2.outblaze.com [202.77.223.2]) |
| by corpmail.outblaze.com (8.12.6/8.12.6) with SMTP id g8R2rMm8029328 |
| for <pgsql-performance@postgresql.org>; Fri, 27 Sep 2002 02:53:22 GMT |
| Received: (qmail 1463 invoked by uid 500); 27 Sep 2002 02:55:10 -0000 |
| Date: Fri, 27 Sep 2002 10:55:10 +0800 |
| From: Yusuf Goolamabbas <yusufg@outblaze.com> |
| To: pgsql-performance@postgresql.org |
| Subject: Would ext3 data=journal help for Postgres synchronous io mode |
| Message-ID: <20020927025510.GB1175@outblaze.com> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| Content-Disposition: inline |
| User-Agent: Mutt/1.4i |
| X-AntiVirus: checked by Vexira Milter 1.0.0.3; VAE 6.15.0.1; VDF 6.15.0.9 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/14 |
| X-Sequence-Number: 14 |
|
|
| According to ext3 hackers (Stephen Tweedie, Andrew Morton). ext3 |
| data=journal mode is much faster than any of the other mode for |
| workloads which do a lot of syncrhonous i/o. Personally, I have seen |
| dramatic improvements on moving mail queues to this mode (postfix in |
| particularly flies with this mode) |
|
|
| While this may seem contradictory (forcing journaling for the data in |
| addition to the metadata), it will likely improve the performance for |
| sync I/O loads like mail servers because it can do all of the I/O to the |
| journal without any seek or sync overhead while the mail is arriving. |
|
|
| I assume that since Postgresql does a lot of fsyncs, it would benefit |
| also. I have sent email to Sridhar asking if he could test this |
|
|
| Another thing to note is that Linux 2.4.x kernels < 2.4.20-pre4 use |
| bounce buffer's to do IO if the machine has > 1GB memory. Distributor |
| kernels such as Redhat/Suse/Mandrake are patched to do IO via DMA |
| to/from highmem (>1GB). According to IBM's paper @ OLS, this improves IO |
| performance by 40% |
|
|
| BTW, Is this list archived on the website |
|
|
| Regards, Yusuf |
| -- |
| Yusuf Goolamabbas |
| yusufg@outblaze.com |
|
|
| From pgsql-general-owner@postgresql.org Thu Sep 26 23:08:32 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 3C676477068 |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 23:08:30 -0400 (EDT) |
| Received: from sss.pgh.pa.us (unknown [192.204.191.242]) |
| by postgresql.org (Postfix) with ESMTP id 3674347703B |
| for <pgsql-general@postgresql.org>; |
| Thu, 26 Sep 2002 23:08:29 -0400 (EDT) |
| Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) |
| by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8R37jhR020360; |
| Thu, 26 Sep 2002 23:07:45 -0400 (EDT) |
| To: Doug McNaught <doug@wireboard.com> |
| Cc: Bruce Momjian <pgman@candle.pha.pa.us>, |
| Greg Copeland <greg@copelandconsulting.net>, |
| shridhar_daithankar@persistent.co.in, |
| PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, |
| PostgresSQL General Mailing List <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-reply-to: <m3znu4igj8.fsf@varsoon.wireboard.com> |
| References: <200209262000.g8QK0mG10553@candle.pha.pa.us> |
| <m3znu4igj8.fsf@varsoon.wireboard.com> |
| Comments: In-reply-to Doug McNaught <doug@wireboard.com> |
| message dated "26 Sep 2002 17:31:55 -0400" |
| Date: Thu, 26 Sep 2002 23:07:44 -0400 |
| Message-ID: <20359.1033096064@sss.pgh.pa.us> |
| From: Tom Lane <tgl@sss.pgh.pa.us> |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1242 |
| X-Sequence-Number: 30823 |
|
|
| Doug McNaught <doug@wireboard.com> writes: |
| > "data=writeback" means that no data is journaled, just metadata (which |
| > is like XFS or Reiser). An fsync() call should still do what it |
| > normally does, commit the writes to disk before returning. |
| > "data=journal" journals all data and is the slowest and safest. |
| > "data=ordered" writes out data blocks before committing a journal |
| > transaction, which is faster than full data journaling (since data |
| > doesn't get written twice) and almost as safe. "data=writeback" is |
| > noted to keep obsolete data in the case of some crashes (since the |
| > data may not have been written yet) but a completed fsync() should |
| > ensure that the data is valid. |
| |
| Thanks for the explanation. |
| |
| > So I guess I'd probably use data=ordered for an all-on-one-fs |
| > installation, and data=writeback for a WAL-only drive. |
|
|
| Actually I think the ideal thing for Postgres would be data=writeback |
| for both data and WAL drives. We can handle loss of un-fsync'd data |
| for ourselves in both cases. |
| |
| Of course, if you keep anything besides Postgres data files on a |
| partition, you'd possibly want the more secure settings. |
|
|
| regards, tom lane |
|
|
| From pgsql-general-owner@postgresql.org Fri Sep 27 01:12:31 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP |
| id D61BE47714E; Fri, 27 Sep 2002 01:12:30 -0400 (EDT) |
| Received: from panda.center-f1.ru (panda.center-f1.ru [195.151.30.15]) |
| by postgresql.org (Postfix) with ESMTP |
| id C4927477196; Fri, 27 Sep 2002 01:12:28 -0400 (EDT) |
| Received: from localhost (byg@localhost) |
| by panda.center-f1.ru (8.11.6/8.11.6) with ESMTP id g8R5Ee308324; |
| Fri, 27 Sep 2002 12:14:40 +0700 |
| X-Authentication-Warning: panda.center-f1.ru: byg owned process doing -bs |
| Date: Fri, 27 Sep 2002 12:14:40 +0700 (NOVST) |
| From: Yury Bokhoncovich <byg@center-f1.ru> |
| To: Bruce Momjian <pgman@candle.pha.pa.us> |
| Cc: Neil Conway <neilc@samurai.com>, <shridhar_daithankar@persistent.co.in>, |
| <pgsql-hackers@postgresql.org>, <pgsql-general@postgresql.org> |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| In-Reply-To: <200209262107.g8QL7vN25965@candle.pha.pa.us> |
| Message-ID: <Pine.LNX.4.44L0.0209271201580.7775-100000@panda.center-f1.ru> |
| MIME-Version: 1.0 |
| Content-Type: TEXT/PLAIN; charset=US-ASCII |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1253 |
| X-Sequence-Number: 30834 |
|
|
| Hello! |
|
|
| On Thu, 26 Sep 2002, Bruce Momjian wrote: |
|
|
| > > I'm not really familiar with the reasoning behind ext2's reputation as |
| > > recovering poorly from crashes; if we fsync a WAL record to disk |
|
|
| On relatively big volumes ext2 recovery can end up in formatting the fs |
| under certain cirrumstances.;-) |
|
|
| > > > I assumed it was the double fsync for the normal and journal that |
| > > > made the journalling file systems slog. |
| > > |
| > > Well, a journalling file system would need to write a journal entry |
| > > and flush that to disk, even if fsync is disabled -- whereas without |
| > > fsync enabled, ext2 doesn't have to flush anything to disk. ISTM that |
| > > the performance advantage of ext2 over ext3 is should be even larger |
| > > when fsync is not enabled. |
| > |
| > Yes, it is still double-writing. I just thought that if that wasn't |
| > happening while the db was waiting for a commit that it wouldn't be too |
| > bad. |
| > |
| > Is it just me or do all the Linux file systems seem like they are |
| > lacking something when PostgreSQL is concerned? We just want a UFS-like |
| > file system on Linux and no one has it. |
| |
| mount -o sync an ext2 volume on Linux - and you can get a "UFS-like" fs.:) |
| mount -o async an FFS volume on FreeBSD - and you can get boost in fs |
| performance. |
| Personally me always mount ext2 fs where Pg is living with sync option. |
| Fsync in pg is off (since 6.3), this way successfully pass thru a few |
| serious crashes on various systems (mostly on power problems). |
| If fsync is on in Pg, performance gets so-oh-oh-oh-oh slowly!=) |
| I just have done upgrade from 2.2 kernel on ext2 to ext3 capable 2.4 one |
| so I'm planning to do some benchmarking. Roughly saying w/o benchmarks, |
| the performance have been degraded in 2/3 proportion. |
| "But better safe then sorry". |
|
|
| -- |
| WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group. |
| Phone: +7 (3832) 106228, ext.140, E-mail: byg@center-f1.ru. |
| Unix is like a wigwam -- no Gates, no Windows, and an Apache inside. |
|
|
|
|
|
|
| From pgsql-performance-owner@postgresql.org Fri Sep 27 05:42:31 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 95321475EDF |
| for <pgsql-performance@postgresql.org>; |
| Fri, 27 Sep 2002 05:42:26 -0400 (EDT) |
| Received: from freemail.agrinet.ch (freemail.agrinet.ch [212.28.134.90]) |
| by postgresql.org (Postfix) with ESMTP id 267654771AE |
| for <pgsql-performance@postgresql.org>; |
| Fri, 27 Sep 2002 05:42:23 -0400 (EDT) |
| Received: from syydelaervli.fortytwo.ch (81.6.8.94) by freemail.agrinet.ch |
| (NPlex 5.1.056) |
| id 3D921E0A00007388 for pgsql-performance@postgresql.org; |
| Fri, 27 Sep 2002 11:42:24 +0200 |
| Received: from atlas.acter.ch (unknown [212.126.160.108]) |
| by syydelaervli.fortytwo.ch (Postfix) with ESMTP id 43EF52A76 |
| for <pgsql-performance@postgresql.org>; |
| Fri, 27 Sep 2002 11:42:23 +0200 (CEST) |
| Received: by atlas.acter.ch (Postfix, from userid 1047) |
| id 7B2A89696; Fri, 27 Sep 2002 11:42:22 +0200 (CEST) |
| Subject: |
| From: Adrian von Bidder <avbidder@fortytwo.ch> |
| To: PostgreSQL Performance Mailing List <pgsql-performance@postgresql.org> |
| Content-Type: text/plain |
| Content-Transfer-Encoding: 7bit |
| X-Mailer: Ximian Evolution 1.0.8 |
| Date: 27 Sep 2002 11:42:22 +0200 |
| Message-Id: <1033119742.13843.9.camel@atlas> |
| Mime-Version: 1.0 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/15 |
| X-Sequence-Number: 15 |
|
|
| subscribe |
| -- |
| secure email with gpg http://fortytwo.ch/gpg |
|
|
| NOTICE: subkey signature! request key 92082481 from keyserver.kjsl.com |
|
|
| From pgsql-general-owner@postgresql.org Fri Sep 27 06:40:18 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 883AA475D00 |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 06:40:17 -0400 (EDT) |
| Received: from news.hub.org (news.hub.org [64.49.215.80]) |
| by postgresql.org (Postfix) with ESMTP id 3C44B475EC7 |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 06:40:16 -0400 (EDT) |
| Received: by news.hub.org (Postfix, from userid 8) |
| id 5AC2C381683; Fri, 27 Sep 2002 06:40:15 -0400 (EDT) |
| From: Mats Lofkvist <mal@algonet.se> |
| X-Newsgroups: comp.databases.postgresql.general, |
| comp.databases.postgresql.questions |
| Subject: Re: [HACKERS] Performance while loading data and indexing |
| Date: 27 Sep 2002 12:40:13 +0200 |
| Organization: Hub.Org Networking Services (http://www.hub.org) |
| Lines: 29 |
| Message-ID: <y2q1y7f3ecy.fsf@algonet.se> |
| References: <87n0q4zc0l.fsf@mailbox.samurai.com> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Complaints-To: news@hub.org |
| User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 |
| To: pgsql-general@postgresql.org |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1268 |
| X-Sequence-Number: 30849 |
|
|
| neilc@samurai.com (Neil Conway) writes: |
|
|
| [snip] |
| > > Well, I have experienced data loss from ext2 before. Also, recovery |
| > > from crashes on large file systems take a very, very long time. |
| > |
| > Yes, but wouldn't you face exactly the same issues if you ran a |
| > UFS-like filesystem in asynchronous mode? Albeit it's not the default, |
| > but performance in synchronous mode is usually pretty poor. |
| > |
| > The fact that ext2 defaults to asynchronous mode and UFS (at least on |
| > the BSDs) defaults to synchronous mode seems like a total non-issue to |
| > me. Is there any more to the alleged difference in reliability? |
|
|
| UFS on most unix systems (BSD, solaris etc) defaults to sync |
| metadata, async data which is a mode that is completely missing |
| from ext2 as far as I know. |
|
|
| This is why UFS is considered safer than ext2. (Running with |
| 'sync' is too slow to be a usable alternative in most cases.) |
|
|
| _ |
| Mats Lofkvist |
| mal@algonet.se |
|
|
|
|
| PS The BSD soft updates yields the safety of the default sync |
| metadata / async data mode while being at least as fast as |
| running fully async. |
|
|
| From pgsql-general-owner@postgresql.org Fri Sep 27 06:49:23 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id CD832476243 |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 06:49:21 -0400 (EDT) |
| Received: from news.hub.org (news.hub.org [64.49.215.80]) |
| by postgresql.org (Postfix) with ESMTP id 69480476160 |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 06:49:21 -0400 (EDT) |
| Received: by news.hub.org (Postfix, from userid 8) |
| id 68B29381683; Fri, 27 Sep 2002 06:49:18 -0400 (EDT) |
| From: Mats Lofkvist <mal@algonet.se> |
| X-Newsgroups: comp.databases.postgresql.general, |
| comp.databases.postgresql.questions |
| Subject: Re: Performance while loading data and indexing |
| Date: 27 Sep 2002 12:49:17 +0200 |
| Organization: Hub.Org Networking Services (http://www.hub.org) |
| Lines: 21 |
| Message-ID: <y2qwup71zde.fsf@algonet.se> |
| References: <3D931438.22010.133ADAFA@localhost> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Complaints-To: news@hub.org |
| User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 |
| To: pgsql-general@postgresql.org |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1269 |
| X-Sequence-Number: 30850 |
|
|
| shridhar_daithankar@persistent.co.in ("Shridhar Daithankar") writes: |
|
|
| [snip] |
| > |
| > Couple MB of data per sec. to disk is just not saturating it. It's a RAID 5 |
| > setup.. |
| > |
| |
| RAID5 is not the best for performance, especially write performance. |
| If it is software RAID it is even worse :-). |
| |
| (Note also that you need to check that you are not saturating the |
| number of seeks the disks can handle, not just the bandwith.) |
| |
| Striping should be better (combined with mirroring if you need the |
| safety, but with both striping and mirroring you may need multiple |
| SCSI channels). |
| |
| _ |
| Mats Lofkvist |
| mal@algonet.se |
| |
| From pgsql-general-owner@postgresql.org Fri Sep 27 11:20:38 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 99F9947608D |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 11:20:36 -0400 (EDT) |
| Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) |
| by postgresql.org (Postfix) with ESMTP id BAD85475FEB |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 11:20:35 -0400 (EDT) |
| Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) |
| by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id g8RFJikY015704; |
| Fri, 27 Sep 2002 09:19:45 -0600 (MDT) |
| Date: Fri, 27 Sep 2002 09:16:03 -0600 (MDT) |
| From: "scott.marlowe" <scott.marlowe@ihs.com> |
| To: Mats Lofkvist <mal@algonet.se> |
| Cc: <pgsql-general@postgresql.org> |
| Subject: Re: Performance while loading data and indexing |
| In-Reply-To: <y2qwup71zde.fsf@algonet.se> |
| Message-ID: <Pine.LNX.4.33.0209270907500.9417-100000@css120.ihs.com> |
| MIME-Version: 1.0 |
| Content-Type: TEXT/PLAIN; charset=US-ASCII |
| X-MailBodyFilter: Message body has not been filtered |
| X-MailScanner: Found to be clean |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1280 |
| X-Sequence-Number: 30861 |
| |
| On 27 Sep 2002, Mats Lofkvist wrote: |
| |
| > shridhar_daithankar@persistent.co.in ("Shridhar Daithankar") writes: |
| > |
| > [snip] |
| > > |
| > > Couple MB of data per sec. to disk is just not saturating it. It's a RAID 5 |
| > > setup.. |
| > > |
| > |
| > RAID5 is not the best for performance, especially write performance. |
| > If it is software RAID it is even worse :-). |
|
|
| I take exception to this. RAID5 is a great choice for most folks. |
|
|
| 1: RAID5 only writes out the parity stripe and data stripe, not all |
| stripes when writing. So, in an 8 disk RAID5 array, writing to a single |
| 64 k stripe involves one 64k read (parity stripe) and two 64k writes. |
|
|
| On a mirror set, writing to one 64k stripe involves two 64k writes. The |
| difference isn't that great, and in my testing, a large enough RAID5 |
| provides so much faster read speads by spreading the reads across so many |
| heads as to more than make up for the slightly slower writes. My testing |
| has shown that a 4 disk RAID5 can generally run about 85% or more the |
| speed of a mirror set. |
| |
| 2: Why does EVERYONE have to jump on the bandwagon that software RAID 5 |
| is bad. My workstation running RH 7.2 uses about 1% of the CPU during |
| very heavy parallel access (i.e. 50 simo pgbenchs) at most. I've seen |
| many hardware RAID cards that are noticeable slower than my workstation |
| running software RAID. You do know that hardware RAID is just software |
| RAID where the processing is done on a seperate CPU on a card, but it's |
| still software doing the work. |
| |
| 3: We just had a hardware RAID card mark both drives in a mirror set bad. |
| It wouldn't accept them back, and all the data was gone. poof. That |
| would never happen in Linux's kernel software RAID, I can always make |
| Linux take back a "bad" drive. |
| |
| |
| The only difference between RAID5 with n+1 disks and RAID0 with n disks is |
| that we have to write a parity stripe in RAID5. It's ability to handle |
| high parallel load is much better than a RAID1 set, and on average, you |
| actually write about the same amount with either RAID1 or RAID5. |
|
|
| Don't dog software RAID5, it works and it works well in Linux. Windows, |
| however, is another issue. There, the software RAID5 is pretty pitiful, |
| both in terms of performance and maintenance. |
| |
| |
| From pgsql-hackers-owner@postgresql.org Fri Sep 27 15:01:43 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 976E6476D74 |
| for <pgsql-hackers@postgresql.org>; |
| Fri, 27 Sep 2002 15:01:42 -0400 (EDT) |
| Received: from Mail.CERT.Uni-Stuttgart.DE (mail.cert.uni-stuttgart.de |
| [129.69.16.17]) by postgresql.org (Postfix) with ESMTP id 3F3234761C2 |
| for <pgsql-hackers@postgresql.org>; |
| Fri, 27 Sep 2002 15:01:38 -0400 (EDT) |
| Received: from rusfw by Mail.CERT.Uni-Stuttgart.DE with local (Exim 4.04) |
| id 17v0Ms-0006Sx-00 |
| for pgsql-hackers@postgresql.org; Fri, 27 Sep 2002 21:01:38 +0200 |
| To: pgsql-hackers@postgresql.org |
| Subject: Re: [GENERAL] Performance while loading data and indexing |
| References: <200209262045.g8QKjtv21744@candle.pha.pa.us> |
| <87vg4szco1.fsf@mailbox.samurai.com> <12930.1033075921@sss.pgh.pa.us> |
| Mail-Followup-To: pgsql-hackers@postgresql.org |
| From: Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> |
| Date: Fri, 27 Sep 2002 21:01:38 +0200 |
| In-Reply-To: <12930.1033075921@sss.pgh.pa.us> (Tom Lane's message of "Thu, |
| 26 Sep 2002 17:32:01 -0400") |
| Message-ID: <87hegbjlyl.fsf@Login.CERT.Uni-Stuttgart.DE> |
| Lines: 12 |
| User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1630 |
| X-Sequence-Number: 29587 |
|
|
| Tom Lane <tgl@sss.pgh.pa.us> writes: |
|
|
| > We'd be happiest with a filesystem that journals its own metadata and |
| > not the user data in the file(s). I dunno if there are any. |
| |
| Most journalling file systems work this way. Data journalling is not |
| very widespread, AFAIK. |
| |
| -- |
| Florian Weimer Weimer@CERT.Uni-Stuttgart.DE |
| University of Stuttgart http://CERT.Uni-Stuttgart.DE/people/fw/ |
| RUS-CERT fax +49-711-685-5898 |
| |
| From pgsql-general-owner@postgresql.org Fri Sep 27 21:46:57 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id CBFF34762B5 |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 21:46:55 -0400 (EDT) |
| Received: from deborah.paradise.net.nz (deborah.paradise.net.nz |
| [203.96.152.32]) |
| by postgresql.org (Postfix) with ESMTP id 107AB47626D |
| for <pgsql-general@postgresql.org>; |
| Fri, 27 Sep 2002 21:46:55 -0400 (EDT) |
| Received: from paradise.net.nz (203-79-74-52.adsl.paradise.net.nz |
| [203.79.74.52]) by deborah.paradise.net.nz (Postfix) with ESMTP |
| id 73EE1D1CAF; Sat, 28 Sep 2002 13:46:48 +1200 (NZST) |
| Message-ID: <3D95082C.4070904@paradise.net.nz> |
| Date: Sat, 28 Sep 2002 13:38:52 +1200 |
| From: Mark Kirkwood <markir@paradise.net.nz> |
| User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 |
| X-Accept-Language: en-us |
| MIME-Version: 1.0 |
| To: "scott.marlowe" <scott.marlowe@ihs.com> |
| Cc: Mats Lofkvist <mal@algonet.se>, pgsql-general@postgresql.org |
| Subject: Re: Performance while loading data and indexing |
| References: <Pine.LNX.4.33.0209270907500.9417-100000@css120.ihs.com> |
| Content-Type: text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding: 7bit |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/1319 |
| X-Sequence-Number: 30900 |
| |
| scott.marlowe wrote: |
| |
| >(snippage) |
| >I take exception to this. RAID5 is a great choice for most folks. |
| > |
| > |
| I agree - certainly RAID5 *used* to be rather sad, but modern cards have |
| improved this no end on the hardware side - e.g. |
| |
| I recently benchmarked a 3Ware 8x card on a system with 4 x 15000 rpm |
| Maxtor 70Gb drives and achieved 120 Mb/s for (8K) reads and 60 Mb/s for |
| (8K) writes using RAID5. I used Redhat 7.3 + ext2. The benchmarking |
| program was Bonnie. |
| |
| Given that the performance of a single disk was ~30 Mb/s for reads and |
| writes, I felt this was quite a good result ! ( Other cards I had tried |
| previously struggled to maintain 1/2 the write rate of a single disk in |
| such a configuration). |
| |
| As for software RAID5, I have not tried it out. |
| |
| Of course I could not get 60Mb/s while COPYing data into Postgres... |
| typically cpu seemed to be the bottleneck in this case (what was the |
| actual write rate? I hear you asking..err.. cant recall I'm afraid.. |
| must try it out again ) |
|
|
| cheers |
|
|
| Mark |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Sat Sep 28 11:49:21 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 7544B475E26 |
| for <pgsql-performance@postgresql.org>; |
| Sat, 28 Sep 2002 11:49:20 -0400 (EDT) |
| Received: from kumudu.nslk.com (kumudu.nslk.com [64.247.55.254]) |
| by postgresql.org (Postfix) with ESMTP id 01B30475E25 |
| for <pgsql-performance@postgresql.org>; |
| Sat, 28 Sep 2002 11:49:20 -0400 (EDT) |
| Received: from [203.94.93.204] (helo=W) |
| by kumudu.nslk.com with asmtp (Exim 3.36 |
| for pgsql-performance@postgresql.org; Sat, 28 Sep 2002 11:49:15 -0400 |
| Message-ID: <010801c26706$be9e3820$cc5d5ecb@A.GEEKIYANAGE> |
| Reply-To: "Waruna Geekiyanage" <waruna@nirmani.com> |
| From: "Waruna Geekiyanage" <waruna@nirmani.com> |
| To: <pgsql-performance@postgresql.org> |
| Subject: INDEX |
| Date: Sat, 28 Sep 2002 21:50:13 +0600 |
| MIME-Version: 1.0 |
| Content-Type: multipart/alternative; |
| boundary="----=_NextPart_000_0105_01C26739.06687120" |
| X-Priority: 3 |
| X-MSMail-Priority: Normal |
| X-Mailer: Microsoft Outlook Express 5.00.2919.6600 |
| X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 |
| X-AntiAbuse: This header was added to track abuse, |
| please include it with any abuse report |
| X-AntiAbuse: Primary Hostname - kumudu.nslk.com |
| X-AntiAbuse: Original Domain - postgresql.org |
| X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] |
| X-AntiAbuse: Sender Address Domain - nirmani.com |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/16 |
| X-Sequence-Number: 16 |
|
|
| This is a multi-part message in MIME format. |
|
|
| ------=_NextPart_000_0105_01C26739.06687120 |
| Content-Type: text/plain; |
| charset="iso-8859-1" |
| Content-Transfer-Encoding: quoted-printable |
|
|
| When a table is created with a primary key it generates a index. |
| Dos the queries on that table use that index automatically? |
| Do I need to reindex that index after insertions? |
|
|
| ------=_NextPart_000_0105_01C26739.06687120 |
| Content-Type: text/html; |
| charset="iso-8859-1" |
| Content-Transfer-Encoding: quoted-printable |
|
|
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <HTML><HEAD> |
| <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"> |
| <META content=3D"MSHTML 6.00.2479.6" name=3DGENERATOR> |
| <STYLE></STYLE> |
| </HEAD> |
| <BODY bgColor=3D |
| <DIV><FONT face=3DArial size=3D2>When a table is created with a primary key= |
| it=20 |
| generates a index.</FONT></DIV> |
| <DIV><FONT face=3DArial size=3D2>Dos the queries on that table use that ind= |
| ex=20 |
| automatically?</FONT></DIV> |
| <DIV><FONT face=3DArial size=3D2>Do I need to reindex that index after=20 |
| insertions?</FONT></DIV></BODY></HTML> |
|
|
| ------=_NextPart_000_0105_01C26739.06687120-- |
|
|
|
|
| From pgsql-performance-owner@postgresql.org Sat Sep 28 15:13:19 2002 |
| Received: from localhost (postgresql.org [64.49.215.8]) |
| by postgresql.org (Postfix) with ESMTP id 5E9C84762E3 |
| for <pgsql-performance@postgresql.org>; |
| Sat, 28 Sep 2002 15:13:18 -0400 (EDT) |
| Received: from mail.libertyrms.com (unknown [209.167.124.227]) |
| by postgresql.org (Postfix) with ESMTP id B81B647612B |
| for <pgsql-performance@postgresql.org>; |
| Sat, 28 Sep 2002 15:13:17 -0400 (EDT) |
| Received: from andrew by mail.libertyrms.com with local (Exim 3.22 |
| (Debian)) |
| id 17vN1i-00065x-00 |
| for <pgsql-performance@postgresql.org>; Sat, 28 Sep 2002 15:13:18 -0400 |
| Date: Sat, 28 Sep 2002 15:13:18 -0400 |
| From: Andrew Sullivan <andrew@libertyrms.info> |
| To: pgsql-performance@postgresql.org |
| Subject: Re: INDEX |
| Message-ID: <20020928151318.B22793@mail.libertyrms.com> |
| Mail-Followup-To: pgsql-performance@postgresql.org |
| References: <010801c26706$be9e3820$cc5d5ecb@A.GEEKIYANAGE> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=us-ascii |
| Content-Disposition: inline |
| User-Agent: Mutt/1.2.5i |
| In-Reply-To: <010801c26706$be9e3820$cc5d5ecb@A.GEEKIYANAGE>; |
| from waruna@nirmani.com on Sat, Sep 28, 2002 at 09:50:13PM +0600 |
| X-Virus-Scanned: by AMaViS new-20020517 |
| X-Archive-Number: 200209/17 |
| X-Sequence-Number: 17 |
|
|
| On Sat, Sep 28, 2002 at 09:50:13PM +0600, Waruna Geekiyanage wrote: |
| > When a table is created with a primary key it generates a index. |
| > Dos the queries on that table use that index automatically? |
|
|
| Only if you analyse the table, and it's a "win". See the various |
| past discussion on -general, for instance, about index use, and the |
| FAQ. |
| |
| > Do I need to reindex that index after insertions? |
| |
| No, but you need to analyse. |
| |
| A |
| |
| -- |
| ---- |
| Andrew Sullivan 204-4141 Yonge Street |
| Liberty RMS Toronto, Ontario Canada |
| <andrew@libertyrms.info> M2P 2A8 |
| +1 416 646 3304 x110 |
| |
| |
| |