Re: Postgresql 9.4 and ZFS?

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql 9.4 and ZFS?
Date: 2015-09-30 12:22:31
Message-ID: 560BD407.8070100@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patric Bechtel 2015-09-30 13:45:43 Re: Postgresql 9.4 and ZFS?
Previous Message Tomas Vondra 2015-09-30 12:01:51 Re: Postgresql 9.4 and ZFS?