Re: ZFS-FreeBSD + postgresql performance

From: Mark Felder <feld(at)FreeBSD(dot)org>
To: Albert Shih <Albert(dot)Shih(at)obspm(dot)fr>, pgsql-admin(at)postgresql(dot)org, freebsd-fs(at)freebsd(dot)org, freebsd-jail(at)freebsd(dot)org
Subject: Re: ZFS-FreeBSD + postgresql performance
Date: 2013-10-23 17:14:25
Message-ID: 1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Oct 23, 2013, at 11:25, Albert Shih wrote:
> Hi
>
> I would like to known if someone here have in production a FreeBSD server
> with postgresql and the FS for the data of postgresql is a ZFS pool.
>
> I'm going to buy some server with 96Go of Ram and a jbod of 12 disks (4To
> each)
>
> The purpose is to have everything on this zfs pool (except the system who
> still on classic raid). So to have
>
> many jail (~20-30) running apache/mysql/etc.
> one postgresql server with all data on the zfs.
>
> each jail use his own zfs partition. So I can use zfs send/received to
> have
> a mirror of everything in a other server.
>
> My question is about the performance, I known ZFS eat all memory he can
> have (or almost), so what append when we run database like postgresql and
> jail ? (it's also the reason of 96 Go ram).
>
> Sorry for cross-posting but it's about 3 differents things....
>

To my understanding the solution is to change the primarycache to
"metadata" for any ZFS filesystem that you do not want ZFS to heavily
cache in memory.

Example:

# zfs set primarycache=metadata tank/usr/local/pgsql

Now for my ZFS filesystem "tank/usr/local/pgsql" where the postgres data
directory exists we will tell ZFS to only cache metadata there. Postgres
will do its own caching of the data.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2013-10-23 17:37:48 Re: Unable to connect. Log : PDTWARNING: worker took too long to start; canceled
Previous Message Albert Shih 2013-10-23 16:25:45 ZFS-FreeBSD + postgresql performance