From: | Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Andres Freund <andres(at)2ndquadrant(dot)com>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Markus Wanner <markus(at)bluegap(dot)ch>, Ants Aasma <ants(at)cybertec(dot)at>, Bruce Momjian <bruce(at)momjian(dot)us>, obartunov <obartunov(at)postgrespro(dot)ru>, Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Borodin Vladimir <root(at)simply(dot)name> |
Subject: | Re: Proposal for CSN based snapshots |
Date: | 2017-09-25 14:17:42 |
Message-ID: | b144ee02-c5c4-f377-5f94-614272f1a76d@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here is some news about the CSN patch.
* I merged it with master (58bd60995f), which now has the clog group
update. With this optimization, CSN is now faster than the master by
about 15% on 100 to 400 clients (72 cores, pgbench tpcb-like, scale
500). It does not degrade faster than master as it did before. The
numbers of clients greater than 400 were not measured.
* Querying for CSN of subtransactions was not implemented in the
previous version of the patch, so I added it. I tested the performance
on the tpcb-like pgbench script with some savepoints added, and it was
significantly worse than on the master. The main culprit seems to be the
ProcArrayLock taken in GetSnapshotData, GetRecentGlobalXmin,
ProcArrayEndTransaction. Although it is only taken in shared mode, just
reading the current lock mode and writing the same value back takes
about 10% CPU. Maybe we could do away with some of these locks, but
there is some interplay with imported snapshots and replication slots
which I don't understand well. I plan to investigate this next.
I am attaching the latest version of the patch and the graphs of
tps/clients for tpcb and tpcb with savepoints.
--
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
image/png | 14.2 KB | |
image/png | 14.0 KB | |
csn-v7.patch | text/x-patch | 469.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-09-25 14:22:46 | Re: [JDBC] Channel binding support for SCRAM-SHA-256 |
Previous Message | Tom Lane | 2017-09-25 14:14:37 | Re: BUG #14825: enum type: unsafe use? |