postgresql/src/include/storage
Andres Freund 9cd00c457e Checkpoint sorting and balancing.
Up to now checkpoints were written in the order they're in the
BufferDescriptors. That's nearly random in a lot of cases, which
performs badly on rotating media, but even on SSDs it causes slowdowns.

To avoid that, sort checkpoints before writing them out. We currently
sort by tablespace, relfilenode, fork and block number.

One of the major reasons that previously wasn't done, was fear of
imbalance between tablespaces. To address that balance writes between
tablespaces.

The other prime concern was that the relatively large allocation to sort
the buffers in might fail, preventing checkpoints from happening. Thus
pre-allocate the required memory in shared memory, at server startup.

This particularly makes it more efficient to have checkpoint flushing
enabled, because that'll often result in a lot of writes that can be
coalesced into one flush.

Discussion: alpine.DEB.2.10.1506011320000.28433@sto
Author: Fabien Coelho and Andres Freund
2016-03-10 17:05:09 -08:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
barrier.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
block.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
buf.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
buf_internals.h Checkpoint sorting and balancing. 2016-03-10 17:05:09 -08:00
buffile.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
bufmgr.h Allow to trigger kernel writeback after a configurable number of writes. 2016-03-10 17:04:34 -08:00
bufpage.h Department of second thoughts: remove PD_ALL_FROZEN. 2016-03-08 08:46:48 -05:00
checksum.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
checksum_impl.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
copydir.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
dsm.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
dsm_impl.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
fd.h Allow to trigger kernel writeback after a configurable number of writes. 2016-03-10 17:04:34 -08:00
freespace.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
fsm_internals.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
indexfsm.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
ipc.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
item.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
itemid.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
itemptr.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
large_object.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
latch.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
lmgr.h Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
lock.h Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
lockdefs.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
lwlock.h Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
off.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_sema.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_shmem.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pmsignal.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pos.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
predicate.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
predicate_internals.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
proc.h Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
procarray.h Create a function to reliably identify which sessions block which others. 2016-02-22 14:31:43 -05:00
procsignal.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
reinit.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
relfilenode.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
s_lock.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
shm_mq.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
shm_toc.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
shmem.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
sinval.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
sinvaladt.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
smgr.h Allow to trigger kernel writeback after a configurable number of writes. 2016-03-10 17:04:34 -08:00
spin.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
standby.h Rework wait for AccessExclusiveLocks on Hot Standby 2016-03-10 19:26:24 +00:00
standbydefs.h Correct Copyright year from 2015 to 2016 2016-02-15 13:19:35 -08:00