X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 947C6D1CA50 for ; Wed, 7 Apr 2004 11:36:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 27142-09 for ; Wed, 7 Apr 2004 11:36:46 -0300 (ADT) Received: from hotmail.com (law10-oe60.law10.hotmail.com [64.4.14.195]) by svr1.postgresql.org (Postfix) with ESMTP id BF362D1BAD5 for ; Wed, 7 Apr 2004 11:36:41 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 7 Apr 2004 07:36:45 -0700 Received: from 67.81.102.201 by law10-oe60.law10.hotmail.com with DAV; Wed, 07 Apr 2004 14:36:45 +0000 X-Originating-IP: [67.81.102.201] X-Originating-Email: [awerman2@hotmail.com] X-Sender: awerman2@hotmail.com From: "Aaron Werman" Cc: References: <0HVS00F9Q906F7@mail.gthome.com> <200404070933.12544.dev@archonet.com> Subject: Re: good pc but bad performance,why? Date: Wed, 7 Apr 2004 10:36:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: X-OriginalArrivalTime: 07 Apr 2004 14:36:45.0889 (UTC) FILETIME=[C0916310:01C41CAD] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/84 X-Sequence-Number: 6384 fsync I'm thinking 50 inserts, if autocommiting is 50TPS = ~100 IO per second (50 WAL + checkpoint IO) = roughly the I/O rate of a single drive. Huang - Are you using a single drive for pg? If so, there is a safety problem of both the data and logs used for recovery on the same drive. If the drive crashes, there is nothing left for recovery. Also, there is a big contention issue, since the log is a fast sequential write, and checkpointing is random. If the log is on a separate drive, you'll probably see insert speed at disk sequential write speed, since the other drive(s) should hopefully be able to keep up when checkpointing. If they share the same drive, you'll see an initial burst of inserts, then a order of magnitude performance drop-off as soon as you checkpoint - because the disk is interleaving the log and data writes. fsync off is only appropriate for externally recoverable processes, such as loading an empty server from a file. /Aaron ----- Original Message ----- From: "Richard Huxton" To: "huang yaqin" ; "Tom Lane" Cc: Sent: Wednesday, April 07, 2004 4:33 AM Subject: Re: [PERFORM] good pc but bad performance,why? On Wednesday 07 April 2004 05:00, huang yaqin wrote: > hello£” > > Thanks, you are right. > I use "postmaster -o "-F" " to start my PG£¬and performance improved > greatly. I don't think Tom was recommending turning fsync off. If you have a system crash/power glitch then the database can become corrupted. If you are happy the possibility if losing your data, write performance will improve noticably. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster