Database performance work has a habit of turning new knobs into rituals. PostgreSQL 18 gives us a genuinely important new one: an asynchronous I/O subsystem that can queue multiple eligible reads instead of forcing a backend to wait for each operation to finish before issuing the next.
That matters for workloads such as sequential scans, bitmap heap scans, and vacuum. The PostgreSQL project has reported benchmark improvements of up to 3× in some storage-bound scenarios. The phrase some scenarios is doing a lot of work there. A query dominated by CPU, locks, network latency, poor cardinality estimates, or an overloaded downstream service will not become three times faster because a server setting acquired a fashionable acronym.
Establish that storage latency or throughput is materially limiting the workload before changing AIO settings.
Compare methods and concurrency on the same data, query shape, cache state, storage class, and load.
Record the before/after plan, latency, throughput, I/O statistics, CPU cost, and rollback values.
Start on the current PostgreSQL 18 minor
As of October 2026, PostgreSQL 18 is the current major release and 18.6 is its current supported minor release. The project recommends running the current minor for a major version because minor releases contain bug, security, corruption, and low-risk fixes. That should be the baseline before performance tuning.
This matters especially for a subsystem as new as AIO. PostgreSQL 18.2 already included an io_uring-related build fix, which is a useful reminder that “the feature exists in 18.0” and “my exact production build behaves the way I expect” are not interchangeable statements.
What PostgreSQL 18 actually changed
Before PostgreSQL 18, the server leaned more heavily on operating-system readahead to hide storage latency. PostgreSQL 18 adds an internal AIO subsystem that lets backends queue eligible I/O operations concurrently. The database therefore has more control over how much useful work it keeps in flight.
The important word is eligible. AIO is not a universal fast path for every read and write in the server. The initial PostgreSQL 18 implementation benefits operations including sequential scans, bitmap heap scans, and vacuum. That is enough to be meaningful for analytics, maintenance, and workloads that regularly move through many pages, but it does not erase query design.
Understand the three io_method choices
PostgreSQL 18 exposes three methods for asynchronous-eligible I/O:
worker: the default. PostgreSQL uses dedicated worker processes to execute asynchronous I/O.io_uring: available on Linux when PostgreSQL was built with liburing support.sync: executes asynchronous-eligible operations synchronously, which is useful as a comparison or compatibility baseline.
io_method is a server-start setting, so changing it is not a casual live tweak. That is a good thing. Storage-path changes deserve an explicit experiment window and a rollback plan.
I would not begin by assuming io_uring must beat the default worker implementation. Start with the supported default, benchmark your real storage and kernel, then compare alternatives. The “more native” option does not get bonus points on an SLO chart.
The concurrency knobs are limits, not goals
effective_io_concurrency tells PostgreSQL how many storage operations it should expect can run concurrently. PostgreSQL 18 defaults it to 16. Higher values can help on higher-latency or high-IOPS storage, but the documentation explicitly warns that unnecessarily high settings may increase I/O latency for all queries.
io_max_concurrency places an upper bound on how many I/O operations one process can execute simultaneously. Its default -1 selects a value automatically from server configuration, capped at 64. io_workers controls the number of I/O workers when io_method=worker and defaults to 3.
-- Capture the configuration before touching it.
SHOW server_version;
SHOW io_method;
SHOW io_workers;
SHOW effective_io_concurrency;
SHOW maintenance_io_concurrency;
SHOW io_max_concurrency;
The temptation is to raise every number until storage graphs become exciting. Resist it. More outstanding I/O can improve throughput until the device, virtualization layer, network-attached volume, or cloud service starts queueing harder. After that point you may increase latency while congratulating yourself for achieving more concurrency.
Benchmark cold and warm behavior separately
A useful AIO benchmark needs enough data to exercise storage. If the entire working set is already in shared buffers or the operating-system page cache, you are mostly benchmarking memory and query execution.
I would keep two explicit test classes:
- Storage-sensitive runs: use a representative dataset large enough to require physical reads, and control cache state as consistently as your environment allows.
- Warm-cache runs: repeat the same query shapes once data is resident, so you can see whether the proposed change simply moves CPU overhead around when storage is no longer dominant.
For each run, keep query parameters, concurrency, plan shape, dataset, PostgreSQL settings, storage class, and application pressure stable. Compare p50 and p95 latency, throughput, CPU, device latency, queue depth, and bytes read. One heroic query run is a screenshot, not a benchmark.
Use PostgreSQL’s I/O views instead of guessing
pg_stat_io reports cluster-wide I/O statistics by backend type, object, and context. PostgreSQL 18 also added byte counters such as read_bytes, write_bytes, and extend_bytes, which makes it easier to connect workload changes to actual I/O volume.
SELECT backend_type, object, context,
reads, read_bytes, read_time,
writes, write_bytes, write_time
FROM pg_stat_io
ORDER BY read_bytes DESC NULLS LAST;
The exact timing columns you rely on depend on the relevant timing settings, so verify what your environment collects before treating zeroes as performance enlightenment.
PostgreSQL 18 also exposes pg_aios, a view of asynchronous I/O handles currently in use. The project describes it as mainly useful for PostgreSQL developers but potentially useful when tuning. That makes it a diagnostic microscope, not the first dashboard I would hand to an on-call engineer.
SELECT pid, state, operation, length,
target, target_desc, f_sync
FROM pg_aios
ORDER BY pid, io_id;
If your benchmark claims AIO is helping but you have not looked at the storage workload, query plans, or PostgreSQL I/O statistics, you have a conclusion in search of evidence.
Vacuum deserves its own test
AIO is also relevant to vacuum, and maintenance work has different goals from request-serving queries. Faster maintenance can be valuable because it shortens the time a database spends doing heavy background work, but pushing maintenance concurrency too aggressively can compete with foreground traffic.
maintenance_io_concurrency exists for that reason. Test vacuum behavior under realistic application load, not only in an empty staging environment at 2 a.m. Track request latency, storage saturation, vacuum duration, and whether the extra concurrency changes contention elsewhere.
Do not benchmark through an application bottleneck
Suppose an API endpoint spends 12 ms in PostgreSQL and 180 ms waiting on an external service. A 30% database improvement will barely move end-to-end latency. Likewise, a Node.js process with an overloaded event loop can hide a database win behind application queueing.
For backend services, measure at both boundaries: direct database workloads to understand the storage change, and end-to-end request workloads to understand whether users receive any benefit. Performance work is only complete when the improvement survives the trip back to the user.
A production rollout I would trust
- Upgrade to the current PostgreSQL minor release for your chosen major version.
- Capture current
io_method, concurrency settings, plans,pg_stat_io, latency percentiles, throughput, CPU, and storage metrics. - Choose storage-sensitive queries and maintenance jobs that are actually important to the product.
- Benchmark the default
workermethod before testingio_uringorsync. - Change one concurrency dimension at a time and keep the rest of the workload fixed.
- Test under realistic client concurrency, not just one session.
- Watch both database performance and underlying device latency or queue depth.
- Roll out to a limited production slice or replica when your architecture allows it.
- Keep the previous server-start settings documented and ready for rollback.
- Re-run the benchmark after major storage, kernel, instance-type, or workload changes. The old optimum is not a constitutional amendment.