Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 945C99F9D8D for ; Fri, 7 Sep 2007 06:45:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55773-01 for ; Fri, 7 Sep 2007 06:45:20 -0300 (ADT) X-Greylist: delayed 00:07:25.373759 by SQLgrey-1.7.5 Received: from ns1.mbigroup.it (ns1.mbigroup.it [84.233.239.71]) by postgresql.org (Postfix) with ESMTP id 403649FA57A for ; Fri, 7 Sep 2007 06:45:19 -0300 (ADT) Received: from mailserver.bo.mbigroup.it (webmail.bo.mbigroup.it [192.168.10.13]) by ns1.mbigroup.it (8.12.10/8.12.10) with ESMTP id l879bjVR011164 for ; Fri, 7 Sep 2007 11:37:45 +0200 Received: from mfatticcioni.op.mbigroup.it (mfatticcioni.op.mbigroup.it [192.168.12.15]) by mailserver.bo.mbigroup.it (8.12.11/8.12.11) with ESMTP id l879bjxc000890 for ; Fri, 7 Sep 2007 11:37:45 +0200 Message-ID: <46E11BE4.6060500@mbigroup.it> Date: Fri, 07 Sep 2007 11:37:40 +0200 From: Maila Fatticcioni Reply-To: mfatticcioni@mbigroup.it Organization: MBI User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: DRBD and Postgres: how to improve the perfomance? X-Enigmail-Version: 0.95.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDE925C223275B25D3B11EC3F" X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on ns1.mbigroup.it X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on mailserver.bo.mbigroup.it X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200709/119 X-Sequence-Number: 26664 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDE925C223275B25D3B11EC3F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello. We have made some performance tests with DRBD and Postgresql 8.2.3. We have two identical servers in a cluster (Dell 2950) with a partition of 100 GB managed by DRBD: once we checked Postgres keeping his data folder in a local partition, the second time we moved the data folder in the shared partition. The two servers are connected point to point using a cross cable to reduce their latency. The partition is mounted with the option noatime in order to not update the inode access time in case of read access. We used pgbench for the testings, creating a dabase of about 3GB with a scale of 200. After we perfomed 10 tests for each configuration, simulating the usage of 100 clients with 500 transactions each. DRBD configuration: -------------------------------------------------------------------------= ------------------- resource drbd0 { protocol C; incon-degr-cmd "halt -f"; on db-node1 { device /dev/drbd0; disk /dev/sda2; address 10.0.0.201:7788; meta-disk internal; } on db-node2 { device /dev/drbd0; disk /dev/sda2; address 10.0.0.202:7788; meta-disk internal; } syncer { rate 700000K; } } -------------------------------------------------------------------------= ------------------- Pgbench -------------------------------------------------------------------------= ------------------- pgbench -i pgbench -s 200 pgbench -c 100 -t 500 pgbench -------------------------------------------------------------------------= ------------------- The results were that the TPS (transaction per second) with Postgres running in the local partition is almost double than the one with the DRD= B: Postgres in shared DRBD partition: 60.863324 TPS Postgres in local partition: 122.016138 TPS Obviously, working with the database in DRBD, we had two writes instead of only one but we are a bit disappointed about the low results. We would like to know if there is any way to improve the performance in order to have a 3/4 rate instead of the 1/2 one. We would really appreciate it if you could give us some feedback. Thank you in advance, Maila Fatticcioni --=20 ______________________________________________________________ Maila Fatticcioni ______________________________________________________________ Mediterranean Broadband Infrastructure s.r.l. ITALY ______________________________________________________________ --------------enigDE925C223275B25D3B11EC3F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4Rvoi2q3wPb3FcMRAhx6AKDi9cU6/mdSDv+KnwG7k1SmujxiSgCguCsR XI9axOcrOf0gQRLaIDL459Q= =6C9s -----END PGP SIGNATURE----- --------------enigDE925C223275B25D3B11EC3F--