From fc34b0d9de27ab5ac2887da00b3892bdabd89e45 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 16 Mar 2020 12:31:34 +1300 Subject: Introduce a maintenance_io_concurrency setting. Introduce a GUC and a tablespace option to control I/O prefetching, much like effective_io_concurrency, but for work that is done on behalf of many client sessions. Use the new setting in heapam.c instead of the hard-coded formula effective_io_concurrency + 10 introduced by commit 558a9165e08. Go with a default value of 10 for now, because it's a round number pretty close to the value used for that existing case. Discussion: https://postgr.es/m/CA%2BhUKGJUw08dPs_3EUcdO6M90GnjofPYrWp4YSLaBkgYwS-AqA%40mail.gmail.com --- doc/src/sgml/config.sgml | 20 ++++++++++++++++++++ doc/src/sgml/ref/alter_tablespace.sgml | 11 +++++++---- doc/src/sgml/ref/create_tablespace.sgml | 11 +++++++---- 3 files changed, 34 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 3cac340f323..672bf6f1ee7 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2229,6 +2229,26 @@ include_dir 'conf.d' + + maintenance_io_concurrency (integer) + + maintenance_io_concurrency configuration parameter + + + + + Similar to effective_io_concurrency, but used + for maintenance work that is done on behalf of many client sessions. + + + The default is 10 on supported systems, otherwise 0. This value can + be overridden for tables in a particular tablespace by setting the + tablespace parameter of the same name (see + ). + + + + max_worker_processes (integer) diff --git a/doc/src/sgml/ref/alter_tablespace.sgml b/doc/src/sgml/ref/alter_tablespace.sgml index acec33469f1..356fb9f93f3 100644 --- a/doc/src/sgml/ref/alter_tablespace.sgml +++ b/doc/src/sgml/ref/alter_tablespace.sgml @@ -84,13 +84,16 @@ ALTER TABLESPACE name RESET ( , , - ). This may be useful if + , + ). This may be useful if one tablespace is located on a disk which is faster or slower than the remainder of the I/O subsystem. diff --git a/doc/src/sgml/ref/create_tablespace.sgml b/doc/src/sgml/ref/create_tablespace.sgml index c621ec2c6bf..462b8831c27 100644 --- a/doc/src/sgml/ref/create_tablespace.sgml +++ b/doc/src/sgml/ref/create_tablespace.sgml @@ -106,13 +106,16 @@ CREATE TABLESPACE tablespace_name A tablespace parameter to be set or reset. Currently, the only available parameters are seq_page_cost, - random_page_cost and effective_io_concurrency. - Setting either value for a particular tablespace will override the + random_page_cost, effective_io_concurrency + and maintenance_io_concurrency. + Setting these values for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in - that tablespace, as established by the configuration parameters of the + that tablespace, and the executor's prefetching behavior, as established + by the configuration parameters of the same name (see , , - ). This may be useful if + , + ). This may be useful if one tablespace is located on a disk which is faster or slower than the remainder of the I/O subsystem. -- cgit v1.2.3