Skip to content

Commit cc6be07

Browse files
Increase default maintenance_io_concurrency to 16
Since its introduction in fc34b0d, the default maintenance_io_concurrency has been larger than the default effective_io_concurrency. maintenance_io_concurrency primarily controlled prefetching done on behalf of the whole system, for operations like recovery. Therefore it makes sense for it to have a value equal to or greater than effective_io_concurrency, which controls I/O concurrency for reading a relation in a bitmap heap scan. ff79b5b increased effective_io_concurrency to 16, so we'll increase maintenance_io_concurrency as well. For now, though, we'll keep the defaults of effective_io_concurrency and maintenance_io_concurrency equal to one another (16). On fast, high IOPs systems, significantly higher values of maintenance_io_concurrency are observably beneficial [1]. However, such values would flood low IOPs systems and increase overall system I/O latency. It is worth mentioning that since 9256822 and c3e775e, maintenance_io_concurrency also controls the I/O concurrency of each vacuum worker. Since many autovacuum workers may be simultaneously issuing I/Os, we want to keep maintenance_io_concurrency appropriately conservative. [1] https://postgr.es/m/c5d52837-6256-0556-ac8c-d6d3d558820a%40enterprisedb.com Suggested-by: Jakub Wartak <jakub.wartak@enterprisedb.com> Discussion: https://postgr.es/m/CAKZiRmxdHQaU%2B2Zpe6d%3Dx%3D0vigJ1sfWwwVYLJAf%3Dud_wQ_VcUw%40mail.gmail.com
1 parent 796bdda commit cc6be07

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

doc/src/sgml/config.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,10 +2617,10 @@ include_dir 'conf.d'
26172617
for maintenance work that is done on behalf of many client sessions.
26182618
</para>
26192619
<para>
2620-
The default is 10 on supported systems, otherwise 0. This value can
2621-
be overridden for tables in a particular tablespace by setting the
2622-
tablespace parameter of the same name (see
2623-
<xref linkend="sql-altertablespace"/>).
2620+
The default is <literal>16</literal> on supported systems, otherwise
2621+
<literal>0</literal>. This value can be overridden for tables in a
2622+
particular tablespace by setting the tablespace parameter of the same
2623+
name (see <xref linkend="sql-altertablespace"/>).
26242624
</para>
26252625
</listitem>
26262626
</varlistentry>

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199

200200
#backend_flush_after = 0 # measured in pages, 0 disables
201201
#effective_io_concurrency = 16 # 1-1000; 0 disables prefetching
202-
#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching
202+
#maintenance_io_concurrency = 16 # 1-1000; 0 disables prefetching
203203
#io_combine_limit = 128kB # usually 1-32 blocks (depends on OS)
204204

205205
#io_method = sync # sync (change requires restart)

src/include/storage/bufmgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ extern PGDLLIMPORT bool track_io_timing;
153153
/* only applicable when prefetching is available */
154154
#ifdef USE_PREFETCH
155155
#define DEFAULT_EFFECTIVE_IO_CONCURRENCY 16
156-
#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 10
156+
#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 16
157157
#else
158158
#define DEFAULT_EFFECTIVE_IO_CONCURRENCY 0
159159
#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy