pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert L Mathews <lists@tigertech.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: ZFS filesystem - supported ?
Date: Mon, 25 Oct 2021 15:01:37 -0700
Message-ID: <2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com> (raw)
In-Reply-To: <168f067f-d0bd-b4ee-8a67-e3b1e41002d2@gmail.com>
References: <49ijds_99IK_4iDOHuZH8CJsKGZw7DEVtJPf0s_oPEvUKwFewHcDQFCUnutcA9GYIkOrRfFAKRsyj0ZFN9ECAbLm-NYPR8jMxTl-RU-U3hA=@protonmail.ch>
	<1e0db1d2-6a9e-f5f7-44af-e7a1997bafcf@gmail.com>
	<I6YF48WTjPJw4DuktwELspDFbDUvnquzGNUUbuukjGiAYfNR3jj1sZAW4wQbs78mRxr84HBbnUjNtj36Vj98nBMk0jvGzqmu3Y5ZH9Egfuw=@protonmail.ch>
	<917520e4-0023-2842-db5f-2e1cbd72b004@gmail.com>
	<741d4f14b64a45d7a9670042ac8ecf66@sud0.nz>
	<77b0fb54-64f5-833d-19ba-2c731af1f700@gmail.com>
	<20211025171342.GH20998@tamriel.snowman.net>
	<a8401006-dd87-282b-19c8-61a87ea54a09@e-blokos.com>
	<168f067f-d0bd-b4ee-8a67-e3b1e41002d2@gmail.com>

On 10/25/21 1:40 PM, Mladen Gogala wrote:
> This is probably not the place 
> to discuss the inner workings of snapshots, but it is worth knowing that 
> snapshots drastically increase the IO rate on the file system - for 
> every snapshot. That's where the slowness comes from.

I have recent anecdotal experience of this. I experiment with using 
Btrfs for a 32 TB backup system that has five 8 TB spinning disks. 
There's an average of 8 MBps of writes scattered around the disks, which 
isn't super high, obviously.

The results were vaguely acceptable until I created a snapshot of it, at 
which point it became completely unusable. Even having one snapshot 
present caused hundreds of btrfs-related kernel threads to thrash in the 
"D" state almost constantly, and it never stopped doing that even when 
left for many hours.

I then experimented with adding a bcache layer on top of Btrfs to see if 
it would help. I added a 2 TB SSD using bcache, partitioned as 1900 GB 
read cache and 100 GB write cache. It made very little difference and 
was still unusable as soon as a snapshot was taken.

I did play with the various btrfs and bcache tuning knobs quite a bit 
and couldn't improve it.

Since that test was a failure, I then decided to try the same setup with 
OpenZFS on a lark, with the same set of disks in a "raidz" array, with 
the 2 TB SSD as an l2arc read cache (no write cache). It easily handles 
the same load, even with 72 hourly snapshots present, with the default 
settings. I'm actually quite impressed with it.

I'm sure that the RAID, snapshots and copy-on-write reduce the maximum 
performance considerably, compared to ext4. But on the other hand, it 
did provide the performance I expected to be possible given the setup. 
Btrfs *definitely* didn't; I was surprised at how badly it performed.

-- 
Robert L Mathews, Tiger Technologies, http://www.tigertech.net/





view thread (37+ messages)  latest in thread

Message-ID: <2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com>
Permalink:  ../2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com/
Also on:    postgresql.org/message-id/2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: lists@tigertech.com
  Subject: Re: ZFS filesystem - supported ?
  In-Reply-To: <2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com>
  References: <49ijds_99IK_4iDOHuZH8CJsKGZw7DEVtJPf0s_oPEvUKwFewHcDQFCUnutcA9GYIkOrRfFAKRsyj0ZFN9ECAbLm-NYPR8jMxTl-RU-U3hA=@protonmail.ch> <1e0db1d2-6a9e-f5f7-44af-e7a1997bafcf@gmail.com> <I6YF48WTjPJw4DuktwELspDFbDUvnquzGNUUbuukjGiAYfNR3jj1sZAW4wQbs78mRxr84HBbnUjNtj36Vj98nBMk0jvGzqmu3Y5ZH9Egfuw=@protonmail.ch> <917520e4-0023-2842-db5f-2e1cbd72b004@gmail.com> <741d4f14b64a45d7a9670042ac8ecf66@sud0.nz> <77b0fb54-64f5-833d-19ba-2c731af1f700@gmail.com> <20211025171342.GH20998@tamriel.snowman.net> <a8401006-dd87-282b-19c8-61a87ea54a09@e-blokos.com> <168f067f-d0bd-b4ee-8a67-e3b1e41002d2@gmail.com> <2b41a967-d1ff-7f71-436a-b54f1a0d9e5a@tigertech.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox