<story><title>The LZ4 introduced in PostgreSQL 14 provides faster compression</title><url>https://www.postgresql.fastware.com/blog/what-is-the-new-lz4-toast-compression-in-postgresql-14</url></story><parent_chain><item><author>olavgg</author><text>If you are using ZFS, I strongly recommend using LZ4 or ZSTD compression with PostgreSQL. Performance is still awesome. On average I get 2x compressionratio with LZ4 and 4x with ZSTD.&lt;p&gt;With this, you are compressing everything, not just columns. And ZFS has dynamic block sizes which works really great together with compression. For example a 8kb PostgreSQL page, may be stored as a 1kb compressed block on disk.</text></item></parent_chain><comment><author>dekobon</author><text>If you are going to be using PostgreSQL with ZFS, be sure to set:&lt;p&gt;wal_init_zero = off   # zero-fill new WAL files&lt;p&gt;wal_recycle = off    # recycle WAL files&lt;p&gt;Otherwise, you will see some intermittent performance issues.</text></comment>
<story><title>The LZ4 introduced in PostgreSQL 14 provides faster compression</title><url>https://www.postgresql.fastware.com/blog/what-is-the-new-lz4-toast-compression-in-postgresql-14</url></story><parent_chain><item><author>olavgg</author><text>If you are using ZFS, I strongly recommend using LZ4 or ZSTD compression with PostgreSQL. Performance is still awesome. On average I get 2x compressionratio with LZ4 and 4x with ZSTD.&lt;p&gt;With this, you are compressing everything, not just columns. And ZFS has dynamic block sizes which works really great together with compression. For example a 8kb PostgreSQL page, may be stored as a 1kb compressed block on disk.</text></item></parent_chain><comment><author>nikita2206</author><text>Are you finding the benefits and features of ZFS worth the perf penalty? Or maybe even its compression makes it overall a faster alternative to say ext4 for a database?  
I’ve considered in the past running a DB in AWS with direct nvme drive used for SLOG and for L2ARC cache while the main storage would have been a mounted EBS volume, I haven’t tried it but am still wondering if it’s a better alternative to running a DB on top of bare EBS in Amazon (it should be a lot cheaper than say io2 type volume with provisioned IOPS)</text></comment>