postgresql/src/backend
Andres Freund ed127002d8 Align buffer descriptors to cache line boundaries.
Benchmarks has shown that aligning the buffer descriptor array to
cache lines is important for scalability; especially on bigger,
multi-socket, machines.

Currently the array sometimes already happens to be aligned by
happenstance, depending how large previous shared memory allocations
were. That can lead to wildly varying performance results after minor
configuration changes.

In addition to aligning the start of descriptor array, also force the
size of individual descriptors to be of a common cache line size (64
bytes). That happens to already be the case on 64bit platforms, but
this way we can change the struct BufferDesc more easily.

As the alignment primarily matters in highly concurrent workloads
which probably all are 64bit these days, and the space wastage of
element alignment would be a bit more noticeable on 32bit systems, we
don't force the stride to be cacheline sized on 32bit platforms for
now. If somebody does actual performance testing, we can reevaluate
that decision by changing the definition of BUFFERDESC_PADDED_SIZE.

Discussion: 20140202151319.GD32123@awork2.anarazel.de

Per discussion with Bruce Momjan, Tom Lane, Robert Haas, and Peter
Geoghegan.
2015-01-29 22:48:45 +01:00
..
access Fix bug where GIN scan keys were not initialized with gin_fuzzy_search_limit. 2015-01-29 19:35:55 +02:00
bootstrap Remove some dead IsUnderPostmaster code from bootstrap.c. 2015-01-14 00:37:02 +01:00
catalog Add usebypassrls to pg_user and pg_shadow 2015-01-28 21:47:15 -05:00
commands Clean up range-table building in copy.c 2015-01-28 17:42:28 -05:00
executor Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix typos, update README. 2015-01-23 15:06:53 -05:00
libpq Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
main Always set the six locale category environment variables in main(). 2015-01-07 22:34:57 -05:00
nodes Improve new caching logic in tbm_add_tuples(). 2015-01-16 13:28:30 -05:00
optimizer Fix ancient thinko in default table rowcount estimation. 2015-01-18 17:04:11 -05:00
parser Prevent duplicate escape-string warnings when using pg_stat_statements. 2015-01-22 18:11:00 -05:00
po Translation updates 2014-12-15 00:25:35 -05:00
port Add barriers to the latch code. 2015-01-13 12:58:43 +01:00
postmaster Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Further cleanup of ReorderBufferCommit(). 2015-01-25 22:49:56 -05:00
rewrite Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Align buffer descriptors to cache line boundaries. 2015-01-29 22:48:45 +01:00
tcop Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Move out-of-memory error checks from aset.c to mcxt.c 2015-01-29 10:23:38 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
nls.mk xlogreader.c: Fix report_invalid_record translatability flag 2015-01-09 12:34:25 -03:00