pgsql: Reduce the initial size of local lock hash to 16 entries.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reduce the initial size of local lock hash to 16 entries.
Date: 2011-04-15 12:07:48
Message-ID: E1QAhoS-0000wd-8B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Reduce the initial size of local lock hash to 16 entries.

The hash table is seq scanned at transaction end, to release all locks,
and making the hash table larger than necessary makes that slower. With
very simple queries, that overhead can amount to a few percent of the total
CPU time used.

At the moment, backend startup needs 6 locks, and a simple query with one
table and index needs 3 locks. 16 is enough for even quite complicated
transactions, and it will grow automatically if it fills up.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4c37c1e3b2a7ba7b5519e5e366720e7444878a78

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2011-04-15 13:35:42 pgsql: Note that Bison on GnuWin32 has trouble with paths with spaces
Previous Message Dave Page 2011-04-15 11:06:24 pginstaller - pginst: Update for 8.3.15