Re: Postgresql 9.4 and ZFS? - Mailing list pgsql-general

From Tomas Vondra
Subject Re: Postgresql 9.4 and ZFS?
Date
Msg-id 560BD407.8070100@2ndquadrant.com
Whole thread Raw
In response to Postgresql 9.4 and ZFS?  (Benjamin Smith <ben@chico.com>)
Responses Re: Postgresql 9.4 and ZFS?
List pgsql-general
Hi,

On 09/29/2015 07:01 PM, Benjamin Smith wrote:
> Does anybody here have any recommendations for using PostgreSQL 9.4
> (latest)with ZFS?

I think this really depends on the workload - if you have a lot of
random writes, CoW filesystems will perform significantly worse than
e.g. EXT4 or XFS, even on SSD.

>
> We've been running both on ZFS/CentOS 6 with excellent results, and
> are considering putting the two together. In particular, the CoW
> nature (and subsequent fragmentation/thrashing) of ZFS becomes
> largely irrelevant on SSDs; the very act of wear leveling on an SSD
> is itself a form of intentional thrashing that doesn't affect
> performance since SSDs have no meaningful seek time.

I don't think that's entirely true. Sure, SSD drives handle random I/O
much better than rotational storage, but it's not entirely free and
sequential I/O is still measurably faster.

It's true that the drives do internal wear leveling, but it probably
uses tricks that are impossible to do at the filesystem level (which is
oblivious to internal details of the SSD). CoW also increases the amount
of blocks that need to be reclaimed.

In the benchmarks I've recently done on SSD, EXT4 / XFS are ~2x faster
than ZFS. But of course, if the ZFS features are interesting for you,
maybe it's a reasonable price.

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Postgresql 9.4 and ZFS?
Next
From: Patric Bechtel
Date:
Subject: Re: Postgresql 9.4 and ZFS?