Re: Speedup twophase transactions
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Stas Kelvich <s.kelvich@postgrespro.ru>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Simon Riggs <simon@2ndquadrant.com>, Andres Freund <andres@anarazel.de>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-01-12T05:14:04Z
Lists: pgsql-hackers
Attachments
- 2pc_remove_prepXacts.v1.patch (application/octet-stream) patch v1
On 11 January 2016 at 23:11, Stas Kelvich <s.kelvich@postgrespro.ru> wrote: > > > > On 11 Jan 2016, at 21:43, Simon Riggs <simon@2ndquadrant.com> wrote: > > > > Have you measured lwlocking as a problem? > > > > Yes. GXACT locks that wasn’t even in perf top 10 on dual Xeon moves to the > first places when running on 60 core system. But Jesper’s flame graph on 24 > core system shows different picture. I think we can use a shmem hash table to identify the GID by name during LockGxact and avoid duplicates during prepare. Hashing on the first 16 bytes of the GID should be sufficient in most cases; the worst case would be the same as it is now, all depending on how people use the GID name field. The hash value can be calculated outside of the lock. We can also partition the lock without risk, just adds a little extra code. We can also optimize final removal (sketch of how to do that attached). -- Simon Riggs http://www.2ndQuadrant.com/ <http://www.2ndquadrant.com/> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Speedup 2PC recovery by skipping two phase state files in normal path
- 728bd991c3c4 10.0 landed
-
Add tests for two-phase commit
- 30820982b295 10.0 landed
-
Improve grammar of message about two-phase state files.
- 38c363adf497 10.0 landed
-
Speedup 2PC by skipping two phase state files in normal path
- 978b2f65aa12 9.6.0 cited