diff options
| author | Andres Freund | 2025-03-30 23:14:55 +0000 |
|---|---|---|
| committer | Andres Freund | 2025-03-30 23:16:47 +0000 |
| commit | 2a5e709e721cf5f890cde51755b84cfe25d1c4d9 (patch) | |
| tree | e48d7981c9ea2c20b9da99e5f78c7173875f7c68 /src/backend/utils | |
| parent | ae3df4b34155d4a3811762e78d5076e64df66fba (diff) | |
Enable IO concurrency on all systems
Previously effective_io_concurrency and maintenance_io_concurrency could not
be set above 0 on machines without fadvise support. AIO enables IO concurrency
without such support, via io_method=worker.
Currently only subsystems using the read stream API will take advantage of
this. Other users of maintenance_io_concurrency (like recovery prefetching)
which leverage OS advice directly will not benefit from this change. In those
cases, maintenance_io_concurrency will have no effect on I/O behavior.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/CAAKRu_atGgZePo=_g6T3cNtfMf0QxpvoUh5OUqa_cnPdhLd=gw@mail.gmail.com
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/misc/guc_tables.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 76c7c6bb4b1..4eaeca89f2c 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -3235,7 +3235,7 @@ struct config_int ConfigureNamesInt[] = &effective_io_concurrency, DEFAULT_EFFECTIVE_IO_CONCURRENCY, 0, MAX_IO_CONCURRENCY, - check_effective_io_concurrency, NULL, NULL + NULL, NULL, NULL }, { @@ -3249,7 +3249,7 @@ struct config_int ConfigureNamesInt[] = &maintenance_io_concurrency, DEFAULT_MAINTENANCE_IO_CONCURRENCY, 0, MAX_IO_CONCURRENCY, - check_maintenance_io_concurrency, assign_maintenance_io_concurrency, + NULL, assign_maintenance_io_concurrency, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 7c12434efa2..ff56a1f0732 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -198,8 +198,8 @@ # - I/O - #backend_flush_after = 0 # measured in pages, 0 disables -#effective_io_concurrency = 16 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 16 # 1-1000; 0 disables prefetching +#effective_io_concurrency = 16 # 1-1000; 0 disables issuing multiple simultaneous IO requests +#maintenance_io_concurrency = 16 # 1-1000; same as effective_io_concurrency #io_max_combine_limit = 128kB # usually 1-128 blocks (depends on OS) # (change requires restart) #io_combine_limit = 128kB # usually 1-128 blocks (depends on OS) |
