Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id F410F632997 for ; Thu, 24 Jun 2010 09:43:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 43336-03 for ; Thu, 24 Jun 2010 12:43:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.planwerk6.de (taube.planwerk6.de [88.198.1.9]) by mail.postgresql.org (Postfix) with ESMTP id C8B1463275E for ; Thu, 24 Jun 2010 09:43:37 -0300 (ADT) Received: from localhost (taube.planwerk6.de [127.0.0.1]) by mail.planwerk6.de (Postfix) with ESMTP id 5582C85C0FB for ; Thu, 24 Jun 2010 14:43:34 +0200 (CEST) Received: from mail.planwerk6.de ([127.0.0.1]) by localhost (mail.planwerk6.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09320-10; Thu, 24 Jun 2010 14:43:33 +0200 (CEST) Received: from janning.localnet (pd95b4e37.dip0.t-ipconnect.de [217.91.78.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.planwerk6.de (Postfix) with ESMTP id 9601185C0AF; Thu, 24 Jun 2010 14:43:33 +0200 (CEST) From: Janning To: pgsql-performance@postgresql.org Subject: Write performance Date: Thu, 24 Jun 2010 14:43:33 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.28-19-generic; KDE/4.2.4; x86_64; ; ) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201006241443.33296.ml@planwerk6.de> Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at planwerk6.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/423 X-Sequence-Number: 39279 Hi, at the moment we encounter some performance problems with our database server. We have a 12 GB RAM machine with intel i7-975 and using 3 disks "Seagate Barracuda 7200.11, ST31500341AS (1.5 GB)" One disk for the system and WAL etc. and one SW RAID-0 with two disks for postgresql data. Our database is about 24GB. Our munin graph reports at 9:00 a clock writes of 3000 blocks per second and reads of about 1000 blocks per second on our disk which holds the data directories of postgresql (WAL are on a different disk) 3000 blocks ~ about 3 MB/s write 1000 blocks ~ about 1 MB/s read At the same time we have nearly 50% CPU I/O wait and only 12% user CPU load (so 4 of 8 cpu cores are in use for io wait) We know, its a poor man disk setup (but we can not find a hoster with rather advanced disk configuration at an affordable price). Anyway, we ran some tests on it: # time sh -c "dd if=/dev/zero of=bigfile bs=8k count=3000000 && sync" 3000000+0 records in 3000000+0 records out 24576000000 bytes (25 GB) copied, 276.03 s, 89.0 MB/s real 4m48.658s user 0m0.580s sys 0m51.579s # time dd if=bigfile of=/dev/null bs=8k 3000000+0 records in 3000000+0 records out 24576000000 bytes (25 GB) copied, 222.841 s, 110 MB/s real 3m42.879s user 0m0.468s sys 0m18.721s Of course, writing large chunks is quite a different usage pattern. But I am wondering that writing 3MB/s and reading 1 MB/s seams to be a limit if i can run a test with 89 MB/s writing and 110MB/s reading. Can you give some hints, if this numbers seems to be reasonable? kind regards Janning