Re: WAL & ZFS

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: WAL & ZFS
Date: 2022-04-01 02:54:11
Message-ID: FB7F0E59-578C-4BF5-8049-F746F7ACAF6E@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> I would consider Linux ZFS only for toy databases that do not hold any serious data.

We have tested performance extensively, and ZFS performance is fine for our database (5TB, something like 100GB/day data inserted and deleted). I would consider hardly anything else for serious data, since hardly anything else deals properly with bit rot.

A few comments on the articles:

> Phoronix has tested ZFS against Ext3, Ext4 and XFS. ZFS was consistently performing worse than all other file systems. Here is the test with Oracle:
>
> https://blog.docbert.org/oracle-on-zfs/
>
> Here are several articles that caution against ZFS:
>
> https://forums.servethehome.com/index.php?threads/very-slow-zfs-raidz2-performance-on-truenas-12.33094/

One person opens the thread saying their performance is terrible. Others say their performance is OK and give tuning hints. OP says "Block size has been settled to 128Kb, I just use it for too much everything to go too big or too small. so here we sit." Which, wow. You can create as many ZFS file systems as you want on a pool, with different recordsizes. Seriously, create a file system for your database configured for your database.

> https://serverfault.com/questions/791154/zfs-good-read-but-poor-write-speeds

Post is 5 years old, well before lz4 compression was in OpenZFS, and lz4 is key to getting decent DB write performance. Also note that poster was testing against an iSCSCI block device with no idea whatsoever about the actual disk configuration behind it.

> https://www.phoronix.com/scan.php?page=article&item=ubuntu1910-ext4-zfs&num=3

This shows ZFS being slower for SQLite, faster for RocksDB, no tests of PostgreSQL. Also, out-of-the-box config with no attempt to tune for database use.

> And finally, this: https://storytime.ivysaur.me/posts/why-not-zfs/

Wow. This is an absolutely terrible post. It is filled with so much misinformation it would take an entire long post to deconstruct all the errors and biases.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Rui DeSousa 2022-04-01 17:39:52 Re: WAL & ZFS
Previous Message Mladen Gogala 2022-03-31 23:26:35 Re: WAL & ZFS