Increase default effective_io_concurrency to 16
authorMelanie Plageman <melanieplageman@gmail.com>
Wed, 12 Mar 2025 19:56:59 +0000 (15:56 -0400)
committerMelanie Plageman <melanieplageman@gmail.com>
Wed, 12 Mar 2025 19:57:44 +0000 (15:57 -0400)
commitff79b5b2aba02d720f9b7fff644dd50ce07b8c6e
tree4591f073288d14e04bb2e5b000ab496a55669bf4
parentaf717317a04f5217728ce296edf4a581eb7e6ea0
Increase default effective_io_concurrency to 16

The default effective_io_concurrency has been 1 since it was introduced
in b7b8f0b6096d2ab6e. Referencing the associated discussion [1], it
seems 1 was chosen as a conservative value that seemed unlikely to cause
regressions.

Experimentation on high latency cloud storage as well as fast, local
nvme storage (see Discussion link) shows that even slightly higher
values improve query timings substantially. 1 actually performs worse
than 0 [2]. With effective_io_concurrency 1, we are not prefetching
enough to avoid I/O stalls, but we are issuing extra syscalls.

The new default is 16, which should be more appropriate for common
hardware while still avoiding flooding low IOPs devices with I/O
requests.

[1] https://www.postgresql.org/message-id/flat/FDDBA24E-FF4D-4654-BA75-692B3BA71B97%40enterprisedb.com
[2] https://www.postgresql.org/message-id/CAAKRu_Zv08Cic%3DqdCfzrQabpEXGrd9Z9UOW5svEVkCM6%3DFXA9g%40mail.gmail.com

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAAKRu_Z%2BJa-mwXebOoOERMMUMvJeRhzTjad4dSThxG0JLXESxw%40mail.gmail.com
doc/src/sgml/config.sgml
src/backend/utils/misc/postgresql.conf.sample
src/include/storage/bufmgr.h