summaryrefslogtreecommitdiff
path: root/src/include/storage/bufmgr.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-09-08 12:51:42 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-09-08 12:51:42 -0300
commit1aba62ec635f5852bc45ce65482366e541e61ff5 (patch)
tree1161cc00324cb8d229b831a944432646ae1552d5 /src/include/storage/bufmgr.h
parent665a00c9e2598e3be366cb9f99c0a04a51dd8c7a (diff)
Allow per-tablespace effective_io_concurrency
Per discussion, nowadays it is possible to have tablespaces that have wildly different I/O characteristics from others. Setting different effective_io_concurrency parameters for those has been measured to improve performance. Author: Julien Rouhaud Reviewed by: Andres Freund
Diffstat (limited to 'src/include/storage/bufmgr.h')
-rw-r--r--src/include/storage/bufmgr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index ec0a254566e..0f59201bf5b 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -58,11 +58,17 @@ extern int target_prefetch_pages;
/* in buf_init.c */
extern PGDLLIMPORT char *BufferBlocks;
+/* in guc.c */
+extern int effective_io_concurrency;
+
/* in localbuf.c */
extern PGDLLIMPORT int NLocBuffer;
extern PGDLLIMPORT Block *LocalBufferBlockPointers;
extern PGDLLIMPORT int32 *LocalRefCount;
+/* upper limit for effective_io_concurrency */
+#define MAX_IO_CONCURRENCY 1000
+
/* special block number for ReadBuffer() */
#define P_NEW InvalidBlockNumber /* grow the file to get a new page */
@@ -144,6 +150,7 @@ extern PGDLLIMPORT int32 *LocalRefCount;
/*
* prototypes for functions in bufmgr.c
*/
+extern bool ComputeIoConcurrency(int io_concurrency, double *target);
extern void PrefetchBuffer(Relation reln, ForkNumber forkNum,
BlockNumber blockNum);
extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);