Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZ23y-0001TM-OV for pgsql-admin@arkaria.postgresql.org; Wed, 23 Oct 2013 17:17:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VZ23x-0000cU-MG for pgsql-admin@arkaria.postgresql.org; Wed, 23 Oct 2013 17:17:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZ20s-0000V0-OI for pgsql-admin@postgresql.org; Wed, 23 Oct 2013 17:14:30 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZ20p-0005Mu-Ht for pgsql-admin@postgresql.org; Wed, 23 Oct 2013 17:14:30 +0000 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id CFB7F20CAC; Wed, 23 Oct 2013 13:14:25 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute6.internal (MEProxy); Wed, 23 Oct 2013 13:14:25 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=wnKDUyOj9OT9emJ7KZqCK5FfF0I=; b=OV9 wehDboy2zmVghFgYXrI79/EzO+2wul5psyc6AM2dpRjMGPRPWXTESb49QWfCsTbE u3S6o9APXm/eCE6ZYvQimpMZaPOTd9yZv8BL5EFjdzNJ47ui4Y93uUK05X97nXSK W5XhnJ0YXtmmxMyjgcy6fSM+6+PQ9sjHtU0JQCL0= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 81DE1112CAE; Wed, 23 Oct 2013 13:14:25 -0400 (EDT) Message-Id: <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> X-Sasl-Enc: ZB3phMnykfvYtnsScG5xuDSYrImvYv+PKGgSX4PlbR7F 1382548465 From: Mark Felder To: Albert Shih , pgsql-admin@postgresql.org, freebsd-fs@freebsd.org, freebsd-jail@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-25c9bdb0 In-Reply-To: <20131023162545.GA19794@pcjas.obspm.fr> References: <20131023162545.GA19794@pcjas.obspm.fr> Subject: Re: ZFS-FreeBSD + postgresql performance Date: Wed, 23 Oct 2013 12:14:25 -0500 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin