aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-12-25 17:24:30 +0100
committerAndres Freund <andres@anarazel.de>2014-12-25 17:24:30 +0100
commitab5194e6f617a9a9e7aadb3dd1cee948a42d0755 (patch)
treef4f4721d152a393168bba9448726421d8ffc6f8e /src/backend/access/gist
parent7882c3b0b95640e361f1533fe0f2d02e4e5d8610 (diff)
downloadpostgresql-ab5194e6f617a9a9e7aadb3dd1cee948a42d0755.tar.gz
postgresql-ab5194e6f617a9a9e7aadb3dd1cee948a42d0755.zip
Improve LWLock scalability.
The old LWLock implementation had the problem that concurrent lock acquisitions required exclusively acquiring a spinlock. Often that could lead to acquirers waiting behind the spinlock, even if the actual LWLock was free. The new implementation doesn't acquire the spinlock when acquiring the lock itself. Instead the new atomic operations are used to atomically manipulate the state. Only the waitqueue, used solely in the slow path, is still protected by the spinlock. Check lwlock.c's header for an explanation about the used algorithm. For some common workloads on larger machines this can yield significant performance improvements. Particularly in read mostly workloads. Reviewed-By: Amit Kapila and Robert Haas Author: Andres Freund Discussion: 20130926225545.GB26663@awork2.anarazel.de
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions