Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 05EA94DA6AA for ; Thu, 10 May 2012 09:20:25 -0300 (ADT) Received: from elizabeth.gransy.com ([89.187.132.199]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SSSM3-00008T-3S for pgsql-performance@postgresql.org; Thu, 10 May 2012 12:20:24 +0000 Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id C08AD15E419F; Thu, 10 May 2012 14:20:02 +0200 (CEST) Received: from 212.47.19.46 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Thu, 10 May 2012 14:20:02 +0200 Message-ID: <5c3033fd2e913a6f10d02a4a3460ee15.squirrel@sq.gransy.com> In-Reply-To: <37AC2C75CBA4411F84F5F995EDF91503@maumau> References: <61B94EF1D7774715BC565DD84C731BDD@maumau> <37AC2C75CBA4411F84F5F995EDF91503@maumau> Date: Thu, 10 May 2012 14:20:02 +0200 Subject: Re: Could synchronous streaming replication really degrade the performance of the primary? From: "Tomas Vondra" To: "MauMau" Cc: "Claudio Freire" , "Merlin Moncure" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/77 X-Sequence-Number: 46901 On 10 Kv=C4=9Bten 2012, 13:34, MauMau wrote: > The workload is TPC-C-like write-heavy one; DBT-2. They compared the > throughput of synchronous replication case against that of no replicati= on > case. > > Today, they told me that they ran the test on two virtual machines on a > single physical machine. They also used pgpool-II in both cases. In > addition, they may have ran the applications and pgpool-II on the same > virtual machine as the database server. So they've run a test that is usually I/O bound on a single machine? If they've used the same I/O devices, I'm surprised the degradation was just 50%. If you have a system that can handle X IOPS, and you run two instances there, each will get ~X/2 IOPS. No magic can help here. Even if they used separate I/O devices, there are probably many things that are shared and can become a bottleneck in a virtualized environment. The setup is definitely very suspicious. > It sounded to me that the resource is so scarce that concurrency was lo= w, > or > your assumption may be correct. I'll hear more about their environment > from > them. > > BTW it's pity that I cannot find any case study of performance of the > flagship feature of PostgreSQL 9.0/9.1, streaming replication... There were some nice talks about performance impact of sync rep, for example this one: http://www.2ndquadrant.com/static/2quad/media/pdfs/talks/SyncRepDurabil= ity.pdf There's also a video: http://www.youtube.com/watch?v=3DXL7j8hTd6R8 Tomas