X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EDEF4D1B1D2 for ; Tue, 6 Jul 2004 12:00:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88060-02 for ; Tue, 6 Jul 2004 15:00:12 +0000 (GMT) Received: from anubis.cinterfor.org.uy (r200-40-147-2.adinet.com.uy [200.40.147.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5273ED1B181 for ; Tue, 6 Jul 2004 12:00:02 -0300 (ADT) Received: from cinterfor.org.uy (it01.cinterfor.org.uy [200.40.147.47]) by anubis.cinterfor.org.uy (8.11.6/8.11.2) with ESMTP id i66Ehpo06479; Tue, 6 Jul 2004 11:43:51 -0300 Message-ID: <40EABDEF.3090607@cinterfor.org.uy> Date: Tue, 06 Jul 2004 11:57:51 -0300 From: Rodrigo Filgueira Organization: CINTERFOR/OIT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: es, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: to fsync or not to fsync Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Cfor-MailScanner: Found to be clean/Hallado libre de virus X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/14 X-Sequence-Number: 7405 Hello there, I'm trying to make sure my postgres 7.4 is running as fast as it can in my box. My hardware configuration is: HP ML-350G3 Dup processor XEON 2.8 Three U320, 10000 rpm disks, RAID-5 HP 641 Raid Controller. 1GB RAM My Software config is: RedHat 7.3 - 2.4.20-28.7smp Kernel, reporting four processors because of hyper threading. Postgres 7.4 Data directory is on a ext3 journaled filesystem (data=journal) Log directory is on another partition. It is to be a dedicated to databases server, this means there are no other heavy processes running. My tests with pgbench with fsync turned off: [root@dbs pgbench]# ./pgbench -U dba -P 4ghinec osdb -c 10 -s 11 -t 1000 starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 10 number of transactions per client: 1000 number of transactions actually processed: 10000/10000 tps = 408.520028 (including connections establishing) tps = 409.697088 (excluding connections establishing) with fsync turned on: [root@dbs pgbench]# ./pgbench -U dba -P 4ghinec osdb starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1 number of transactions per client: 10 number of transactions actually processed: 10/10 tps = 43.366451 (including connections establishing) tps = 44.867394 (excluding connections establishing) I did a lot of these tests and results are consistent. Now then, without fsync on I get a 1000% improvment!!!! Questions now: 1) since I'm using ext3 with data=journal, do I need to use fsync=true? 2) Is there not a problem with RedHat? should fsyncs asked by postgres to redhat be such a burden? 3) Any other tests you would suggest me to do? thank you all Rodrigo Filgueira Prates IT@CINTERFOR/OIT http://www.cinterfor.org.uy