From: | Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> |
---|---|
To: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Speedup twophase transactions |
Date: | 2015-12-09 22:10:34 |
Message-ID: | [email protected] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks, Kevin.
> I assume that last one should have been *Patched master with 2PC”?
Yes, this list should look like this:
Current master without 2PC: ~42 ktps
Current master with 2PC: ~22 ktps
Patched master with 2PC: ~36 ktps
And created CommitFest entry for this patch.
--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
> On 10 Dec 2015, at 00:37, Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
>
> On Wed, Dec 9, 2015 at 12:44 PM, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> wrote:
>
>> Now 2PC in postgres does following:
>> * on prepare 2pc data (subxacts, commitrels, abortrels, invalmsgs) saved to xlog and to file, but file not is not fsynced
>> * on commit backend reads data from file
>> * if checkpoint occurs before commit, then files are fsynced during checkpoint
>> * if case of crash replay will move data from xlog to files
>>
>> In this patch I’ve changed this procedures to following:
>> * on prepare backend writes data only to xlog and store pointer to the start of the xlog record
>> * if commit occurs before checkpoint then backend reads data from xlog by this pointer
>> * on checkpoint 2pc data copied to files and fsynced
>> * if commit happens after checkpoint then backend reads files
>> * in case of crash replay will move data from xlog to files (as it was before patch)
>
> That sounds like a very good plan to me.
>
>> Now results of benchmark are following (dual 6-core xeon server):
>>
>> Current master without 2PC: ~42 ktps
>> Current master with 2PC: ~22 ktps
>> Current master with 2PC: ~36 ktps
>
> I assume that last one should have been *Patched master with 2PC"?
>
> Please add this to the January CommitFest.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-12-09 22:15:02 | Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates |
Previous Message | Tom Lane | 2015-12-09 21:54:32 | Re: mdnblocks() sabotages error checking in _mdfd_getseg() |