postgresql/src/include/storage
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
..
backendid.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
barrier.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
block.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
buf.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
buf_internals.h Align buffer descriptors to cache line boundaries. 2015-01-29 22:48:45 +01:00
buffile.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
bufmgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
bufpage.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
checksum.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
checksum_impl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
copydir.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
dsm.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
dsm_impl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
fd.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
freespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
fsm_internals.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
indexfsm.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
ipc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
item.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
itemid.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
itemptr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
large_object.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
latch.h Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
lmgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
lock.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
lwlock.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
off.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_sema.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shmem.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pmsignal.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pos.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
predicate.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
predicate_internals.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
proc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
procarray.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
procsignal.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
reinit.h reinit.h: Fix typo in identification comment 2015-01-22 12:26:51 -03:00
relfilenode.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
s_lock.h Blindly try to fix a warning in s_lock.h when compiling with gcc on HPPA. 2015-01-15 13:26:25 +01:00
shm_mq.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
shm_toc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
shmem.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
sinval.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
sinvaladt.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
smgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
spin.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
standby.h Update copyright for 2015 2015-01-06 11:43:47 -05:00