From: | Kevin Grittner <kgrittn(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Inline initial comparisons in TestForOldSnapshot() |
Date: | 2016-04-21 13:47:58 |
Message-ID: | E1atExa-0001od-Dk@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Inline initial comparisons in TestForOldSnapshot()
Even with old_snapshot_threshold = -1 (which disables the "snapshot
too old" feature), performance regressions were seen at moderate to
high concurrency. For example, a one-socket, four-core system
running 200 connections at saturation could see up to a 2.3%
regression, with larger regressions possible on NUMA machines.
By inlining the early (smaller, faster) tests in the
TestForOldSnapshot() function, the i7 case dropped to a 0.2%
regression, which could easily just be noise, and is clearly an
improvement. Further testing will show whether more is needed.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/11e178d0dc4bc2328ae4759090b3c48b07023fab
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 28 +++++-----------------------
src/include/storage/bufmgr.h | 32 +++++++++++++++++++++++++++++++-
2 files changed, 36 insertions(+), 24 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2016-04-21 14:16:18 | Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < |
Previous Message | Robert Haas | 2016-04-21 03:54:30 | pgsql: postgres_fdw: Don't push down certain full joins. |
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2016-04-21 13:57:11 | Re: Wire protocol compression |
Previous Message | Andres Freund | 2016-04-21 13:45:05 | Re: [BUGS] Breakage with VACUUM ANALYSE + partitions |