Amazon RDS is a managed service that provides a reliable and scalable PostgreSQL managed service to handle demanding workloads. PostgreSQL transactions are first logged in Write-Ahead Log (WAL) buffer before being logged and stored elsewhere.
Amazon now offers the Dedicated Log Volume (DLV) feature that enables customers to store WAL segments on separate storage. This ensures the performance of PostgreSQL transactions, as the storage system affects the performance of PostgreSQL transactions.
DLV enables write coalescing that reduces the overall Input/Output Operations Per Second (IOPS) demand for WAL through larger and more efficient I/O operations, increasing throughput and I/O efficiency, reducing high-performance storage's need and minimizing costs while ensuring optimal performance.
To benchmark the performance of Amazon RDS for PostgreSQL, you can use pgbench tool. This tool reveals insights on the Amazon RDS for PostgreSQL deployment's performance characteristics, enabling you to make a direct performance comparison between Amazon RDS with and without DLV feature enabled.
AWS CLI commands are required to launch Amazon RDS for PostgreSQL instances with and without DLV feature. The instances are created with a fixed size of 1,024 GiB and 3,000 Provisioned IOPS.
WAL statistics can be monitoring using AWS Cloudwatch and PostgreSQL’s pg_stat_wal, which provides detailed statistics about WAL activity. Performance benchmarks prove that DLV enhances PostgreSQL database write performance by reducing WAL contention effectively.
Benchmark results confirmed DLV’s effectiveness in mitigating WAL-related wait events, aligning with its intended function. DLV is compatible with PIOPS storage types (io1 and io2 Block Express) and works with PostgreSQL version 13.10 and higher, 14.7 and higher, and 15.2 and higher, across every region.
By using Amazon RDS for PostgreSQL with DLV enabled instead of without, processing time reduced by 92.5%, while transactions per second experienced an increase of 91.83%, and latency improved by 95.56%.
As an alternative to typical storage options, DLV offers enhanced write performance, significantly reducing WAL contention for write-intensive workloads that require fast-write operations and low-latency transactions.
To achieve optimal database performance, DLV offloads write operations to the DLV, freeing up the main database resources, increasing efficiency, and providing quicker data access, making it ideal for tasks demanding high performance consistently.