Re: pgsql: Increase default maintenance_io_concurrency to 16

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Increase default maintenance_io_concurrency to 16
Date: 2025-03-18 20:08:22
Message-ID: Z9nStg5TJssYfg_b@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


This commit makes our default random_page_cost = 4 out of line with
these new settings (assumes modern SSD/NAS/SAN hardware) and more out of
line with reality.

---------------------------------------------------------------------------

On Tue, Mar 18, 2025 at 01:08:47PM +0000, Melanie Plageman wrote:
> Increase default maintenance_io_concurrency to 16
>
> Since its introduction in fc34b0d9de27a, 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.
>
> ff79b5b2ab 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 9256822608f and c3e775e608f,
> 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(dot)wartak(at)enterprisedb(dot)com>
> Discussion: https://postgr.es/m/CAKZiRmxdHQaU%2B2Zpe6d%3Dx%3D0vigJ1sfWwwVYLJAf%3Dud_wQ_VcUw%40mail.gmail.com
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/cc6be07ebde2aef7cc0507f997f563ce77c00a00
>
> Modified Files
> --------------
> doc/src/sgml/config.sgml | 8 ++++----
> src/backend/utils/misc/postgresql.conf.sample | 2 +-
> src/include/storage/bufmgr.h | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2025-03-18 20:13:26 Re: pgsql: Increase default maintenance_io_concurrency to 16
Previous Message Tom Lane 2025-03-18 19:35:45 pgsql: Doc: manually break lines in wide UUID examples.

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-03-18 20:12:18 Re: AIO v2.5
Previous Message Tom Lane 2025-03-18 19:50:20 Re: Update Unicode data to Unicode 16.0.0