Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Postgres isn't slow, your storage is

At POSETTE 2026, Sai Srirampur delivered a presentation titled "Postgres Isn’t Slow. Your Storage Is." The session explored how storage impacts PostgreSQL performance when scaling. This article summarizes the key findings from the talk and the storage architecture recommended for running PostgreSQL on local NVMe in a production environment.

The presentation begins by highlighting several symptoms that teams using PostgreSQL at scale may observe, such as ingestion slowing down, unpredictable P95 read latency, autovacuum falling behind, checkpoints competing for resources with actual workloads, and logical replication accumulating lag. Although these issues may have different root causes, they can also share a common underlying factor that is often overlooked: storage performance.

To explain this, Sai conducted a benchmark comparing the same 3.3-billion-row PostgreSQL workload on gp3 EBS and local NVMe storage. The full talk can be viewed in the video linked below. The benchmark procedure involved running the same PostgreSQL workload on eight identical clusters, with four clusters using NVMe storage and four using gp3 EBS storage.

The clusters ran on m6id.4xlarge instances, each equipped with 16 vCPUs, 64 GiB of RAM, and 16 GiB of shared_buffers. The PostgreSQL heap contained 482 GiB of data, consisting of 3.3 billion rows. The clusters then executed the same highly concurrent random-UPDATE workload for five minutes, with 64 clients and 16 worker threads.

The only difference between the two groups was the storage class. The benchmark results showed a significant difference in performance: the NVMe clusters achieved a median of 16,030 transactions per second (TPS), while the EBS clusters achieved only 1,734 TPS—a 9.24× difference. Additionally, the median transaction latency dropped from 36.9 ms to 4.0 ms in the NVMe clusters, compared to EBS.

The study also examined various operations. On EBS, a VACUUM over 10 GB of bloat took 964 seconds, while on NVMe, it took only 366 seconds. Similarly, draining a 10 GB logical-replication backlog took 238 seconds on EBS, compared to 139 seconds on NVMe. However, it is important to note that these results are specific to this particular workload and storage configurations.

The EBS side utilized baseline gp3 provisioned at 3,000 IOPS, and different EBS configurations could yield different results. The substantial performance gap between the two storage options can be attributed to the amount of time spent waiting on storage. In the EBS benchmark, 19 ms of the 37 ms transaction latency was attributed to page reads, while only 0.3 ms was due to EBS storage.

On the NVMe side, WAL fsync at commit added 1.5 ms, while lock and scheduler overhead contributed 0.2 ms. CPU work itself remained roughly the same for both storage options, at about 2 ms. A snapshot of the active sessions showed that 29 out of 64 sessions on EBS were waiting on IO:DataFileRead, while only 9 out of 64 sessions on NVMe were waiting.

Over the course of the benchmark, the NVMe host spent about 2,253 CPU-seconds, or roughly 9.4 cores, while the EBS host spent only 251 CPU-seconds, or about one core. The NVMe host kept more CPU capacity available for other tasks, which helped reduce the overall latency. In summary, the results of Sai Srirampur's benchmark clearly demonstrate that slow storage can indeed be the root cause of several seemingly unrelated PostgreSQL problems.

By running PostgreSQL on local NVMe storage instead of network-attached storage like gp3 EBS, organizations can greatly reduce storage latency and improve overall performance. The talk provides a valuable case for adopting local NVMe storage in production environments, particularly when dealing with large PostgreSQL workloads.

Rewritten by urgent.news; may contain errors — check the original.

Source: clickhouse.com

Read the original at clickhouse.com →

Report a problem with this story

More in Tech

More from Monday 12 October →