From owner-freebsd-jail@FreeBSD.ORG Wed Oct 23 20:58:02 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84CAEDFB for ; Wed, 23 Oct 2013 20:58:02 +0000 (UTC) (envelope-from schmiedgen@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F1B82005 for ; Wed, 23 Oct 2013 20:58:01 +0000 (UTC) Received: from pepe.smoke.local ([94.222.160.176]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MLA45-1VZMcI3gcz-000NOg for ; Wed, 23 Oct 2013 22:58:00 +0200 Message-ID: <52683855.6060609@gmx.net> Date: Wed, 23 Oct 2013 22:57:57 +0200 From: Michael Schmiedgen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Mark Felder , Albert Shih , pgsql-admin@postgresql.org, freebsd-fs@freebsd.org, freebsd-jail@freebsd.org Subject: Re: ZFS-FreeBSD + postgresql performance References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> In-Reply-To: <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:fdlY+MwsF9R3ms4shkHaPTv1C7mxfKYqVZ8LvhkAyagLp8G6/p0 0dRjJxddTXHr4Gk+EGj740OMy1tYLY5KcyCgGcnTGTgwmEmnMu1Fv/YEnf6MjcLD2acGLqt CAWhCE06lSmVt6WawlsaKO9YDu+vTxAXmYRERaIs9cnO1MC8Rwx54QMAW5skLUiOSA74aai DCMq0f42lt+pMysDdeHPQ== X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 20:58:02 -0000 On 10/23/13 19:14, Mark Felder wrote: > On Wed, Oct 23, 2013, at 11:25, Albert Shih wrote: >> 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 In addition to this it is recommended to set the recordsize to the fixed value of 8k on dataset creation. Michael