Re: Distributed transactions and asynchronous commit

From: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Distributed transactions and asynchronous commit
Date: 2013-07-17 10:09:17
Message-ID: 51E66D4D.3050106@2ndquadrant.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(dot)broccolo(at)2ndQuadrant(dot)it | www.2ndQuadrant.it

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Xenofon Papadopoulos 2013-07-17 10:52:19 Re: Distributed transactions and asynchronous commit
Previous Message Vasilis Ventirozos 2013-07-17 09:28:50 Re: Distributed transactions and asynchronous commit