From owner-freebsd-fs@FreeBSD.ORG Thu Oct 24 12:25:28 2013 Return-Path: Delivered-To: freebsd-fs@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 9C7F8E6 for ; Thu, 24 Oct 2013 12:25:28 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5EB682A6F for ; Thu, 24 Oct 2013 12:25:28 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id w8so4956113qac.8 for ; Thu, 24 Oct 2013 05:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eGZnpZq0SfVchBO1nSgwH66egoWwzyL6+UmooANussM=; b=B7Fg3bgk4feQ42WiIYutcGh/5LYKB34JCrXwVHAi120japcj4S+l4Tae48NiE+jq/k 0Ly/1JsuUnhW0v7DgIP7eaC41giftR7YXGKXmkNL89H7xfSF4lqNDD+1cx8FSFT4vi9i PgQHALHUde2Qkjqm2akICcY2cTaSIH0SNml9QierEcyXsqzJbVOTlmhr+/wWYxCHLEYh 4bwvvy8UB819ssQzCGJKtJXLJGAeiPtkYBD5g5ZDdwpasy6+jSvA3AhbNEZI9dVMFu36 SjC1iy9Y77amHIDoGaDrEGWquIumVFa6oxBfD2qqYOEIkIkIgND21eqJZO6wn0VgAU32 s9RQ== MIME-Version: 1.0 X-Received: by 10.229.12.197 with SMTP id y5mr3035686qcy.8.1382617527486; Thu, 24 Oct 2013 05:25:27 -0700 (PDT) Received: by 10.224.55.77 with HTTP; Thu, 24 Oct 2013 05:25:27 -0700 (PDT) In-Reply-To: References: <20131023162545.GA19794@pcjas.obspm.fr> Date: Thu, 24 Oct 2013 13:25:27 +0100 Message-ID: Subject: Re: ZFS-FreeBSD + postgresql performance From: krad To: Ronald Klop Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD FS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 12:25:28 -0000 It is also generally better to allocate the ram to the db rather than zfs. This reduces context switches, and the db can cache more intelligently that the file system. However your mileage with this may vary depending on the db in question. On a system with such a large memory pool limiting zrc to 8 gb, maybe a good thing to do, especially if you can hook up a large l2arc. You say also say each jail has its own partition, by this i presume you mean zfs dataset. You may want to consider having separate pools of each db/jail, as this would limit spindle contention, but could produce a complicated system. If your dbs are doing lots of writes, consider implementing raid 10 on the pools level as its much faster for writes. As you have a lots of dbs, and potentially a lot of spindles, you could mix and match the above ideas depending on the dbs profile. Have say a raidz6 pool for you lower traffic mostly read dbs, a raid 10 pool for your heavy write dbs, and a dedicated pool for you low latency db On 24 October 2013 09:20, Ronald Klop wrote: > On Wed, 23 Oct 2013 18:25:45 +0200, 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.... >> >> Regards. >> >> JAS >> > > Databases do a lot of sync writes, so it might be good to use a fast ZIL > device (SSD). > > Ronald. > > ______________________________**_________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@**freebsd.org > " >