pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>
To: pgsql-performance@postgresql.org
Subject: Re: Distributed transactions and asynchronous commit
Date: Wed, 17 Jul 2013 12:09:17 +0200
Message-ID: <51E66D4D.3050106@2ndquadrant.it> (raw)
In-Reply-To: <CANL7jAQcVDPC7O8mSEicaJFCjRHdVUtEy=U2WHrKa=HVr0wjGA@mail.gmail.com>
References: <CANL7jAQcVDPC7O8mSEicaJFCjRHdVUtEy=U2WHrKa=HVr0wjGA@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Hi,

Il 17/07/2013 09:18, Xenofon Papadopoulos ha scritto:
> In the asynchronous commit documentation, it says:
>
> /The commands supporting two-phase commit, such as PREPARE 
> TRANSACTION, are also always synchronous
> /
>
> Does this mean that all queries that are part of a distributed 
> transaction are synchronous?
>
> In our databases we have extremely high disk I/O, I'm wondering if 
> distributed transactions may be the reason behind it.

Distributed transactions are base on two-phase-commit (2PC) algorithms 
for ensuring correct transaction completion,  so are synchronous.
However, I think this is not the main reason behind your extremely high 
disk I/O. You should check if your system is properly tuned to get the 
best performances.
First of all, you could take a look on your PostgreSQL configurations, 
and check if shared_memory is set properly taking into account your RAM 
availability. The conservative PostgreSQL default value is 24 MB, 
forcing system to exploit many disk I/O resources.
Aside from this, you could take a look if autovacuum is often triggered 
(generating a large amount of I/O) in case of large use of 
updates/inserts in your database.

Regards,

Giuseppe.

-- 
Giuseppe Broccolo - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it

view thread (8+ messages)  latest in thread

Message-ID: <51E66D4D.3050106@2ndquadrant.it>
Permalink:  ../51E66D4D.3050106@2ndquadrant.it/
Also on:    postgresql.org/message-id/51E66D4D.3050106@2ndquadrant.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: giuseppe.broccolo@2ndquadrant.it
  Subject: Re: Distributed transactions and asynchronous commit
  In-Reply-To: <51E66D4D.3050106@2ndquadrant.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox