From owner-freebsd-jail@FreeBSD.ORG Mon Oct 21 05:08:48 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 A2B61551 for ; Mon, 21 Oct 2013 05:08:48 +0000 (UTC) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [217.115.13.199]) by mx1.freebsd.org (Postfix) with ESMTP id D594E29ED for ; Mon, 21 Oct 2013 05:08:47 +0000 (UTC) Received: (qmail 93749 invoked from network); 21 Oct 2013 05:08:40 -0000 Received: from elektropost.org (HELO elektropost.org) (erdgeist@erdgeist.org) by elektropost.org with CAMELLIA256-SHA encrypted SMTP; 21 Oct 2013 05:08:40 -0000 Message-ID: <5264B6D7.7070901@erdgeist.org> Date: Mon, 21 Oct 2013 07:08:39 +0200 From: Dirk Engling User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-jail@FreeBSD.org Subject: BUG in jail(8) variable substitution, and PATCH X-Enigmail-Version: 1.5.2 Content-Type: multipart/mixed; boundary="------------030405060009080902080007" 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: Mon, 21 Oct 2013 05:08:48 -0000 This is a multi-part message in MIME format. --------------030405060009080902080007 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The variable substitution of FreeBSD's jail tool yields unexpected results when a parameter has more than one variable to substitute and one of the later variables needs substitution as well. Consider the simple test case: $A = "A_${B}_C_${D}"; $B = "BBBBB"; $D = "DDDDD_${E}_FFFFF"; $E = "EEEEE"; bar { exec.poststart = "touch /tmp/$A"; } EXPECTED OUTCOME for running "jail -c bar" would be a file with the name /tmp/A_BBBBB_C_DDDDD_EEEEE_FFFFF to be touched (and, of course, the jail bar being created). OBSERVED OUTCOME is a file with the name /tmp/A_BBBDDDDD_EEEEE_FFFFFBB_C_ being created. The reason is the way jail(8) resolves recursive substitutions. In head/usr.sbin/jail/config.c:193 a varoff variable is introduced that handles a shifting offset for multiple variable substitutions per parameter. This varoff is updated after each substitution in line 239 to reflect a new offset into the parameter's string. This ensures that all other variables are substituted at [their insertion point plus varoff] which is the accumulated length of all previously substituted variables. Now in our example, if $A is to be expanded, first ${B} is inserted at offset 2 and varoff becomes 10. When substituting ${D}, the recursion check at line 216 detects that variable $D also needs expansion. It reorders the parameter list, so that the algorithm works on variable $D now. Then it jumps to find_vars at line 191 and properly expands DDDDD_${E}_FFFFF to DDDDD_EEEEE_FFFFF. When the algorithm now returns to expanding $A by entering the loop body again, it finds a re-set varoff variable leading to (the now expanded) variable $D being inserted at the offset 5, where the parser initially would find it (the internal format for $A is approx: { "A__C_", {2, "B"}, {5, "D"}}) and not at the corrected offset 10. PROPOSED SOLUTION: Get rid of the varoff and replace line 239 with: [struct cfvar *]vv = v; while ((vv = STAILQ_NEXT(vv, tq))) v->pos += vs->len; to make the offset permanent. Find a patch attached. Regards, erdgeist --------------030405060009080902080007 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="config.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="config.c.patch" Index: config.c =================================================================== --- config.c (revision 256751) +++ config.c (working copy) @@ -129,9 +129,8 @@ struct cfjail *j, *tj, *wj; struct cfparam *p, *vp, *tp; struct cfstring *s, *vs, *ns; - struct cfvar *v; + struct cfvar *v, *vv; char *ep; - size_t varoff; int did_self, jseq, pgen; if (!strcmp(cfname, "-")) { @@ -190,7 +189,6 @@ p->gen = ++pgen; find_vars: TAILQ_FOREACH(s, &p->val, tq) { - varoff = 0; while ((v = STAILQ_FIRST(&s->vars))) { TAILQ_FOREACH(vp, &j->params, tq) if (!strcmp(vp->name, v->name)) @@ -232,11 +230,13 @@ goto bad_var; } s->s = erealloc(s->s, s->len + vs->len + 1); - memmove(s->s + v->pos + varoff + vs->len, - s->s + v->pos + varoff, - s->len - (v->pos + varoff) + 1); - memcpy(s->s + v->pos + varoff, vs->s, vs->len); - varoff += vs->len; + memmove(s->s + v->pos + vs->len, + s->s + v->pos, + s->len - v->pos + 1); + memcpy(s->s + v->pos, vs->s, vs->len); + vv = v; + while ((vv = STAILQ_NEXT(vv, tq))) + vv->pos += vs->len; s->len += vs->len; while ((vs = TAILQ_NEXT(vs, tq))) { ns = emalloc(sizeof(struct cfstring)); --------------030405060009080902080007-- From owner-freebsd-jail@FreeBSD.ORG Mon Oct 21 05:12:42 2013 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A59D6E2 for ; Mon, 21 Oct 2013 05:12:42 +0000 (UTC) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [217.115.13.199]) by mx1.freebsd.org (Postfix) with ESMTP id CC4F22A30 for ; Mon, 21 Oct 2013 05:12:40 +0000 (UTC) Received: (qmail 94104 invoked from network); 21 Oct 2013 05:12:39 -0000 Received: from elektropost.org (HELO elektropost.org) (erdgeist@erdgeist.org) by elektropost.org with CAMELLIA256-SHA encrypted SMTP; 21 Oct 2013 05:12:39 -0000 Message-ID: <5264B7C6.9040101@erdgeist.org> Date: Mon, 21 Oct 2013 07:12:38 +0200 From: Dirk Engling User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-jail@FreeBSD.org Subject: Re: BUG in jail(8) variable substitution, and PATCH References: <5264B6D7.7070901@erdgeist.org> In-Reply-To: <5264B6D7.7070901@erdgeist.org> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Mon, 21 Oct 2013 05:12:42 -0000 On 21.10.13 07:08, Dirk Engling wrote: > to make the offset permanent. Find a patch attached. The patch's white spaces have been mangled, find the correct patch here: https://erdgeist.org/arts/software/jail/usr.sbin.jail-substitution.patch Regards, erdgeist From owner-freebsd-jail@FreeBSD.ORG Mon Oct 21 11:06:50 2013 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 190839E9 for ; Mon, 21 Oct 2013 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05C142E18 for ; Mon, 21 Oct 2013 11:06:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9LB6nWd018681 for ; Mon, 21 Oct 2013 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9LB6naJ018679 for freebsd-jail@FreeBSD.org; Mon, 21 Oct 2013 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 21 Oct 2013 11:06:49 GMT Message-Id: <201310211106.r9LB6naJ018679@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-jail@FreeBSD.org Subject: Current problem reports assigned to freebsd-jail@FreeBSD.org 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: Mon, 21 Oct 2013 11:06:50 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/181650 jail [jail] [patch] /etc/rc.d/jail fails if a kernel built o kern/180916 jail [jail] [regression] jail startup is broken for 8.4 wit o kern/180067 jail [jail] [patch] fix multicast support within jails o bin/178302 jail jail(8): unknown parameter: ip6.addr when kernel compi o kern/176112 jail [jail] [panic] kernel panic when starting jails o kern/174902 jail [jail] jail should provide validator for jail names o bin/173469 jail [jail] regression: security.jail.sysvipc_allowed=1 no o kern/169751 jail [jail] reading routing information does not work in ja o bin/167911 jail new jail(8) problem with removal, ifconfg -alias and k o kern/159918 jail [jail] inter-jail communication failure o kern/156111 jail [jail] procstat -b not supported in jail o misc/155765 jail [patch] `buildworld' does not honors WITHOUT_JAIL o conf/154246 jail [jail] [patch] Bad symlink created if devfs mount poin s conf/142972 jail [jail] [patch] Support JAILv2 and vnet in rc.d/jail o conf/141317 jail [patch] uncorrect jail stop in /etc/rc.d/jail o kern/133265 jail [jail] is there a solution how to run nfs client in ja o kern/119842 jail [smbfs] [jail] "Bad address" with smbfs inside a jail o bin/99566 jail [jail] [patch] fstat(1) according to specified jid 18 problems total. From owner-freebsd-jail@FreeBSD.ORG Wed Oct 23 07:16:35 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 497DD35E for ; Wed, 23 Oct 2013 07:16:35 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23E52287A for ; Wed, 23 Oct 2013 07:16:34 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kl14so705610pab.25 for ; Wed, 23 Oct 2013 00:16:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=kByxITh/sx5kHE1xgTcpDHFbaLzhxS1QZQlQkQKyFIU=; b=i18T1Y9lo5qJWFRJi05UPtR3HUN/isyUYLH5lcbVFbTp/DcoADGs1vawxzCcYyguIG AcD+9PBG8OoUqLYHpICGRKNL6uKWlsBmXnIqGXNqNtjG5VAjrEnOGrAfsaNVDotZmZhW mvNsaTU6MiRl5vtknrS4HKMIvx3aynaB7M4UcTNWdNkjB5GoSmModtSbzK00iR9h5Kmc lzM20CFTjRkHJ8Ra8ugClehECg0yDqq+v8B0vgSSii+5dph9ShyP8jiRhqGAea105efU aDLmMkuGatEYbgy9xTDK290bQa/OUgjzD6HUiINw1uxjh0FhmUMMN5h4I4sttZA9hT/c GVwQ== X-Gm-Message-State: ALoCoQm1Z8Tu1JqQXYZ8viT60+Dxmjgal7RlOTfA8k2zYZx82ECWjWdAdh3SHxrsfjOEuU4tTefQ X-Received: by 10.66.148.97 with SMTP id tr1mr1707004pab.163.1382512594291; Wed, 23 Oct 2013 00:16:34 -0700 (PDT) Received: from blackbox.spry.lan ([112.198.64.48]) by mx.google.com with ESMTPSA id qw8sm2399089pbb.27.2013.10.23.00.16.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Oct 2013 00:16:33 -0700 (PDT) Message-ID: <526777CE.8010600@anarchy.in.the.ph> Date: Wed, 23 Oct 2013 15:16:30 +0800 From: "Mars G. Miro" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-jail@freebsd.org Subject: raw sockets on 8.4 jails Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 07:16:35 -0000 Hi list, On a jail on FreeBSD 8.4R-p4 root@waspb1:~# ping -a 4.2.2.2 ping: socket: Operation not permitted root@waspb1:~# nc -uv 4.2.2.2 53 Connection to 4.2.2.2 53 port [udp/domain] succeeded! ^C root@waspb1:~# sysctl security.jail.jailed security.jail.jailed: 1 root@waspb1:~# But I have set it properly on the host: mars@wasp:~% sysctl -a | grep jail security.jail.param.cpuset.id: 0 security.jail.param.host.hostid: 0 security.jail.param.host.hostuuid: 64 security.jail.param.host.domainname: 256 security.jail.param.host.hostname: 256 security.jail.param.children.max: 0 security.jail.param.children.cur: 0 security.jail.param.enforce_statfs: 0 security.jail.param.securelevel: 0 security.jail.param.path: 1024 security.jail.param.name: 256 security.jail.param.parent: 0 security.jail.param.jid: 0 security.jail.enforce_statfs: 2 security.jail.mount_allowed: 0 security.jail.chflags_allowed: 1 security.jail.allow_raw_sockets: 1 security.jail.sysvipc_allowed: 1 security.jail.socket_unixiproute_only: 1 security.jail.set_hostname_allowed: 1 security.jail.jail_max_af_ips: 255 security.jail.jailed: 0 mars@wasp:~% uname -a FreeBSD wasp.spry.lan 8.4-RELEASE-p4 FreeBSD 8.4-RELEASE-p4 #0: Sun Oct 20 16:37:42 PHT 2013 root@XXX:/usr/obj/usr/src/sys/WASP amd64 mars@wasp:~% On an 8.3R-p11 machine it works fine. Problem ? -- When you were born, a big chance was taken for you. From owner-freebsd-jail@FreeBSD.ORG Wed Oct 23 16:26:18 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 7E58E6CC; Wed, 23 Oct 2013 16:26:18 +0000 (UTC) (envelope-from Albert.Shih@obspm.fr) Received: from smtp-int-m.obspm.fr (smtp-int-m.obspm.fr [145.238.187.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 137462B0D; Wed, 23 Oct 2013 16:26:17 +0000 (UTC) Received: from pcjas.obspm.fr (pcjas.obspm.fr [145.238.184.233]) by smtp-int-m.obspm.fr (8.14.3/8.14.3/SIO Observatoire de Paris - 07/2009) with ESMTP id r9NGPjLF004026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 23 Oct 2013 18:25:47 +0200 Date: Wed, 23 Oct 2013 18:25:45 +0200 From: Albert Shih To: pgsql-admin@postgresql.org, freebsd-fs@freebsd.org, freebsd-jail@freebsd.org Subject: ZFS-FreeBSD + postgresql performance Message-ID: <20131023162545.GA19794@pcjas.obspm.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) X-Miltered: at smtp-int-m.obspm.fr with ID 5267F889.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 5267F889.000/145.238.184.233/pcjas.obspm.fr/pcjas.obspm.fr/ 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 16:26:18 -0000 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 -- Albert SHIH DIO bâtiment 15 Observatoire de Paris 5 Place Jules Janssen 92195 Meudon Cedex France Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71 xmpp: jas@obspm.fr Heure local/Local time: mer 23 oct 2013 18:17:24 CEST From owner-freebsd-jail@FreeBSD.ORG Wed Oct 23 17:14:33 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 4498CA30; Wed, 23 Oct 2013 17:14:33 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 188F62E8C; Wed, 23 Oct 2013 17:14:32 +0000 (UTC) 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-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 17:14:33 -0000 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. 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 From owner-freebsd-jail@FreeBSD.ORG Thu Oct 24 06:46:37 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 60365EEF; Thu, 24 Oct 2013 06:46:37 +0000 (UTC) (envelope-from Ivailo.TANUSHEFF@raiffeisen.bg) Received: from mg2.raiffeisen.bg (mg2.raiffeisen.bg [194.48.206.15]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E70B62DE5; Thu, 24 Oct 2013 06:46:36 +0000 (UTC) X-WSS-ID: 0MV5TZU-03-ETV-02 X-M-MSG: Received: from bgrbbl2.rbblan.internal (unknown [10.3.66.167]) by mg2.raiffeisen.bg (Postfix) with ESMTP id 207726425A0; Thu, 24 Oct 2013 09:28:42 +0300 (EEST) In-Reply-To: <52683855.6060609@gmx.net> To: Michael Schmiedgen Subject: Re: ZFS-FreeBSD + postgresql performance From: Ivailo.TANUSHEFF@raiffeisen.bg Message-ID: Date: Thu, 24 Oct 2013 09:28:36 +0300 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> MIME-Version: 1.0 X-KeepSent: 0B1DBA74:B7B14575-C2257C0E:001EC20A; name=$KeepSent; type=4 X-Mailer: Raiffeisenbank (Bulgaria) X-Disclaimed: 31295 X-Mailman-Approved-At: Thu, 24 Oct 2013 11:53:57 +0000 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: owner-freebsd-fs@freebsd.org, freebsd-fs@freebsd.org, pgsql-admin@postgresql.org, freebsd-jail@freebsd.org 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: Thu, 24 Oct 2013 06:46:37 -0000 b3duZXItZnJlZWJzZC1mc0BmcmVlYnNkLm9yZyB3cm90ZSBvbiAyMy4xMC4yMDEzIDIzOjU3OjU3 Og0KDQo+IEZyb206DQo+IA0KPiBNaWNoYWVsIFNjaG1pZWRnZW4gPHNjaG1pZWRnZW5AZ214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IPrB09TSwcjP18HUxczFziDi0s/LxdIg5e/v5Cwg8sHKxsHK2sXOIPPf0tfJ08naIOXh 5Cwg8sHKxsHK2sXOIOzJ2snOxyDi38zHwdLJ0SDv7+QsIPLBysbBytrFziDh1dTPIOzJ2snOxyDi 38zHwdLJ0SDl7+/kIMkg8sHKxsHK2sXOIOnNz9TJIOXv7+QgzsUgzs/T0dQgz9THz9fP0s7P09Qg 2sEgzc/EycbJw8nSwc7JLCDQ0s/Nxc7FzskgyczJIMbBzNvJxsnDydLBzskg09/Pwt3FzsnRLiAg From owner-freebsd-jail@FreeBSD.ORG Fri Oct 25 15:53:47 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 11B088A9 for ; Fri, 25 Oct 2013 15:53:47 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm5-vm6.bullet.mail.sg3.yahoo.com (nm5-vm6.bullet.mail.sg3.yahoo.com [106.10.148.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E47012F6F for ; Fri, 25 Oct 2013 15:53:45 +0000 (UTC) Received: from [106.10.166.127] by nm5.bullet.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:43 -0000 Received: from [106.10.151.171] by tm16.bullet.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:43 -0000 Received: from [127.0.0.1] by omp1011.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:43 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 211028.33007.bm@omp1011.mail.sg3.yahoo.com Received: (qmail 14394 invoked by uid 60001); 25 Oct 2013 15:53:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1382716422; bh=rOunw42EwGWlsKNt/t4UuPfDgQwOxQNSdtxU6YTYDfo=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=v30trmo0cshy5r/n7Fpk/FBT/r4Eo0enyjIReA2jIrjlWJmey2a/H2jbWLvS5zrUuDbC9i0ZRlzOqjm9vlIEjJMcjDVcp+qbz0sLOSX2I6/DyWWrCWXxCEsUL0J27HX73tZtfS7GaKdZY9E/H2rAKX0lnvaHIfIjBqcS1VxcrTI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=VI/e5PhO/3YJpA3EFPOtNpGEunl8J5Ej3nTBYZPOBIBhtYlACIhhnu5F8j9p1NeOkI1ufF5kDdhKD/co2qfXiY5zMmySHHU8hFeV3nK+2LtzkR0taUvIxFcPS2e6PR5bX11wHAu9FzKGJAwzQGrJumILLs648E/JCa7GJVhBMi8=; X-YMail-OSG: x7TykDAVM1lr0gHra6Mhqd7bGnqiFrsnOfXFcXMUxxothsy 5q.6Iz9dhLxQFZ8QVjeYkqTltcW_sbxpJseJbb0I5bCTf050s0tmlgUOuHgv PMxp_Nc8KhScAAdPZObHi8_hoH9ZYB4y4S8smlKbssrkx.AfD45gpaFTaMHz e0N9jFCc2S1mqlB38cSHNXjYcrfzIFHsaKcLvZQXzSuk3slB2KzzsoNiXTKf LamAzrY.joW9mhoY1lcBepvWKUIrORApq2.HwdM7Vb.U_5rC_AYrReo3QsFr rqNRwoxEZsCV0H433gaktvvRdK56lsipfNLAWz8hapu6HiqAYZZosSGbNFtQ xONk77KymhDCnkbPGLnwFDY7WGzXkD2FJpw2uM_X_QtgQ7IxaT6KA2PSSS_9 vwVNLxH2h2ZjF7ZC.ODBoxjCW76IKvnUCwuRJdYoS74eh3nzVEJj1G.Ri.KW vQyI43zHqEo7Mr4IdydLfWF0R2ytfCGm.7Ef3Fxlb21Cl.snvjVJ4arklw1h giBLUX7N0fF6E.KAr8dPTMxFzQp184NLLe8.hWTPZhCNfUbndIYNvZCDyzQF Luwhn3W91iqhaMA-- Received: from [61.15.240.133] by web193504.mail.sg3.yahoo.com via HTTP; Fri, 25 Oct 2013 23:53:42 SGT X-Rocket-MIMEInfo: 002.001, PiBJIHdvdWxkIGFsc28gcmVjb21tZW5kIHRvIHVzZSA0SyBzZWN0b3Igc2l6ZSB1c2luZwpnbm9wIGFuZCB6cG9vbCBleHBvcnQvaW1wb3J0LgoKQWdyZWUsIGluIG15IHNtYWxsIHNldHVwLCA0SyBzZWN0b3JzIGFuZCBhbGlnbmVkIHBhcnRpdGlvbiBjYW4gYmUgc2V2ZW4gb3IgZWlnaHQgdGltZXMgZmFzdGVyIHRoYW4gNTEya2Igc2VjdG9ycyB3aGVuIHRoZSBoYXJkZGlzayBpcyBpbiBhZHZhbmNlIGZvcm1hdCAoNGtiIHBlciBzZWN0b3JzKQoKQWxzbyBzdWdnZXN0IHRvIGhhdmUgdHdvIHNlcGFydGUgZmEBMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> Message-ID: <1382716422.13782.YahooMailNeo@web193504.mail.sg3.yahoo.com> Date: Fri, 25 Oct 2013 23:53:42 +0800 (SGT) From: Patrick Dung Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance To: "Ivailo.TANUSHEFF@raiffeisen.bg" , Michael Schmiedgen In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "owner-freebsd-fs@freebsd.org" , "freebsd-fs@freebsd.org" , "pgsql-admin@postgresql.org" , "freebsd-jail@freebsd.org" X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 15:53:47 -0000 > I would also recommend to use 4K sector size using=0Agnop and zpool expor= t/import.=0A=0AAgree, in my small setup, 4K sectors and aligned partition c= an be seven or eight times faster than 512kb sectors when the harddisk is i= n advance format (4kb per sectors)=0A=0AAlso suggest to have two separte fa= st SSD (in mirror mode) for the ZIL.=0AThis is to avoid ZFS file system fra= gmentation when the ZIL is stored intent with the ZFS.=0A=0APatrick=0A=0A= =0A=0A=0AOn Thursday, October 24, 2013 10:18 PM, "Ivailo.TANUSHEFF@raiffeis= en.bg" wrote:=0A =0Aowner-freebsd-fs@freeb= sd.org wrote on 23.10.2013 23:57:57:=0A=0A> From:=0A> =0A> Michael Schmiedg= en =0A> =0A> To:=0A> =0A> Mark Felder , Albert Shih , =0A> pgsql-admin@postgresql.org, fre= ebsd-fs@freebsd.org, freebsd-jail@freebsd.org, =0A> =0A> Date:=0A> =0A> 23.= 10.2013 23:58=0A> =0A> Subject:=0A> =0A> Re: ZFS-FreeBSD + postgresql perfo= rmance=0A> =0A> Sent by:=0A> =0A> owner-freebsd-fs@freebsd.org=0A> =0A> On = 10/23/13 19:14, Mark Felder wrote:=0A> > On Wed, Oct 23, 2013, at 11:25, Al= bert Shih wrote:=0A> >> My question is about the performance, I known ZFS e= at all=0Amemory he can=0A> >> have (or almost), so what append when we run = database like=0Apostgresql and=0A> >> jail ? (it's also the reason of 96 Go= ram).=0A> >>=0A> >> Sorry for cross-posting but it's about 3 differents th= ings....=0A> >>=0A> >=0A> > To my understanding the solution is to change t= he primarycache=0Ato=0A> > "metadata" for any ZFS filesystem that you do no= t want=0AZFS to heavily=0A> > cache in memory.=0A> >=0A> > Example:=0A> >= =0A> > # zfs set primarycache=3Dmetadata tank/usr/local/pgsql=0A> =0A> In a= ddition to this it is recommended to set the recordsize=0A> to the fixed va= lue of 8k on dataset creation.=0A> =0A> Michael=0A> =0A=0AI would also reco= mmend to use 4K sector size using=0Agnop and zpool export/import.=0AI agree= that using fixed recordsize is a must when=0Ayou have databases and you ha= ve DB on each jail.=0AAlso there are a bunch of sysctl parameters you may= =0Awant to play with, mostly about tuning the memory usage.=0A=0AAlso it mi= ght be an idea to use partitions on disks=0Aand:=0A1. Use first 1-2G on eac= h disk for swap (just in case).=0A2. Use the rest of the disk for 4K aligne= d and 4K=0Asector size partition, labelled in some way (I use disk ID as la= bel, for=0Aeasy identification).=0A=0ABest regards,=0AIvailo Tanusheff=0A= =0A=0A=0ADISCLAIMER: The contents of this e-mail are intended for the named= addressee only. It contains information that may be privileged and/or conf= idential. Unless you are the named addressee or an authorized designee, you= may not copy or use it, or disclose it to anyone else. If you received it = in error please notify us immediately and then destroy it. Messages transpo= rted over the public Internet are susceptible to alteration. Raiffeisenbank= (Bulgaria) EAD, Raiffeisen Asset Management (Bulgaria) EAD, Raiffeisen Ins= urance Broker EOOD, Raiffeisen Services EAD, Raiffeisen Leasing Bulgaria OO= D, Raiffeisen Auto Leasing Bulgaria EOOD and Raiffeisen Real Estate EOOD sh= all not be liable for the message if altered, changed or falsified. =0A=0A= =D0=9E=D0=93=D0=A0=D0=90=D0=9D=D0=98=D0=A7=D0=95=D0=9D=D0=98=D0=95 =D0=9D= =D0=90 =D0=9E=D0=A2=D0=93=D0=9E=D0=92=D0=9E=D0=A0=D0=9D=D0=9E=D0=A1=D0=A2= =D0=A2=D0=90: =D0=A1=D1=8A=D0=B4=D1=8A=D1=80=D0=B6=D0=B0=D0=BD=D0=B8=D0=B5= =D1=82=D0=BE =D0=BD=D0=B0 =D1=82=D0=BE=D0=B2=D0=B0 =D0=B5=D0=BB=D0=B5=D0=BA= =D1=82=D1=80=D0=BE=D0=BD=D0=BD=D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0=B5=D0=BD=D0=B8 =D0=B8=D0=BB=D0=B8 =D1=84=D0=B0= =D0=BB=D1=88=D0=B8=D1=84=D0=B8=D1=86=D0=B8=D1=80=D0=B0=D0=BD=D0=B8 =D1=81= =D1=8A=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F. From owner-freebsd-jail@FreeBSD.ORG Fri Oct 25 15:53:56 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 CB66F8D2 for ; Fri, 25 Oct 2013 15:53:56 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm30-vm5.bullet.mail.sg3.yahoo.com (nm30-vm5.bullet.mail.sg3.yahoo.com [106.10.151.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDAF92F75 for ; Fri, 25 Oct 2013 15:53:55 +0000 (UTC) Received: from [106.10.166.117] by nm30.bullet.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:48 -0000 Received: from [106.10.151.170] by tm6.bullet.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:48 -0000 Received: from [127.0.0.1] by omp1010.mail.sg3.yahoo.com with NNFMP; 25 Oct 2013 15:53:48 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 207274.22051.bm@omp1010.mail.sg3.yahoo.com Received: (qmail 9130 invoked by uid 60001); 25 Oct 2013 15:53:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1382716427; bh=klw1pNG9nVmwNzrlFQTf252xyxIFweAhUlufCCabr3Y=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=d8ikQTBRkOCDXxF5UZSKap4iHvecd2pV8Augzt27GfUpLTA9yi/oZAS9x/Y/RS/VoluwzoiQ/aLK4xF1FYjWSde3F+O9tdsQiiI5Xr4m33Ckpj9N+KtwccimD7jq36XrhLu+4u5XnGxk2ColqkgdsaK+VxrTFpQB9wPFaR4HIi4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=YkgN8a20TJaHCaLvZ17chN+9KyWcyUJA/XRSlAPyYu1533Y4C+/YNOcRcsHhK5uWnED002rQgnvfucKEpAnYe4+gdmqshM1XiVvXbQZEjjJuNn/08pzaeBSvAOoJchq49IKs/b+K3lWe9maBL7ygGXw2Jsz1AeVIlAq5pDcwgfY=; X-YMail-OSG: WEbHG7YVM1laivZl9fMLty_hL8opVycekky8cofQPCnQnDc o1PqSiaqBvuAjKmyLCbvDnqvnofNHpQZ3zE4t0u23Sbr.P.r3QZDU0Qu3kqd qUNPwadIldsvaEL9wBBJdpZgZCdwij3FjLSzPDYAoIfemCMdJl4lIiYPKkCZ 8HFMz9cxdDjLSbFhK_c2wUHOtvI0BM0Z.znLeYTUcCI193FL_Qm2R6e2zqYS Yk0A._YdM6nDhaEvzPpPEkT9ftXazaxtNZUwaNEaoiSQ9zZ0dhw5MTJWL_dc R3btwmWn75u6uEx85wb_Ppj0kzpLlQNQ91TtrJxrrW1hUV9VUFlsEsWzCo.q TKL7jOQ5b2qLMVLxbMMbLU4lZDcf5B5rHTs1DSUps.xTVxtOKNy1pmLwLOfb INmIsjlTCc28u5gme5wzXCdpo5aKBrO57XriN.Ar43PdHWPjhGax3Upb8C_i F.S0n644X5xI_j9ilDNU6nCJmf.7Zyjc2oJ7R0w9dnY6o_Ki_SqHVboZkZw1 A519yre50mc6.8cSu6q5DZW6NsZ0kDAsmaOjkcVYK8dNHjF2i5qiVrsap6ur sldon_y3Lep51hg-- Received: from [61.15.240.133] by web193503.mail.sg3.yahoo.com via HTTP; Fri, 25 Oct 2013 23:53:47 SGT X-Rocket-MIMEInfo: 002.001, PiBJIHdvdWxkIGFsc28gcmVjb21tZW5kIHRvIHVzZSA0SyBzZWN0b3Igc2l6ZSB1c2luZwpnbm9wIGFuZCB6cG9vbCBleHBvcnQvaW1wb3J0LgoKQWdyZWUsIGluIG15IHNtYWxsIHNldHVwLCA0SyBzZWN0b3JzIGFuZCBhbGlnbmVkIHBhcnRpdGlvbiBjYW4gYmUgc2V2ZW4gb3IgZWlnaHQgdGltZXMgZmFzdGVyIHRoYW4gNTEya2Igc2VjdG9ycyB3aGVuIHRoZSBoYXJkZGlzayBpcyBpbiBhZHZhbmNlIGZvcm1hdCAoNGtiIHBlciBzZWN0b3JzKQoKQWxzbyBzdWdnZXN0IHRvIGhhdmUgdHdvIHNlcGFydGUgZmEBMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> Message-ID: <1382716427.9107.YahooMailNeo@web193503.mail.sg3.yahoo.com> Date: Fri, 25 Oct 2013 23:53:47 +0800 (SGT) From: Patrick Dung Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance To: "Ivailo.TANUSHEFF@raiffeisen.bg" , Michael Schmiedgen In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "owner-freebsd-fs@freebsd.org" , "freebsd-fs@freebsd.org" , "pgsql-admin@postgresql.org" , "freebsd-jail@freebsd.org" X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 15:53:56 -0000 > I would also recommend to use 4K sector size using=0Agnop and zpool expor= t/import.=0A=0AAgree, in my small setup, 4K sectors and aligned partition c= an be seven or eight times faster than 512kb sectors when the harddisk is i= n advance format (4kb per sectors)=0A=0AAlso suggest to have two separte fa= st SSD (in mirror mode) for the ZIL.=0AThis is to avoid ZFS file system fra= gmentation when the ZIL is stored intent with the ZFS.=0A=0APatrick=0A=0A= =0A=0A=0AOn Thursday, October 24, 2013 10:18 PM, "Ivailo.TANUSHEFF@raiffeis= en.bg" wrote:=0A =0Aowner-freebsd-fs@freeb= sd.org wrote on 23.10.2013 23:57:57:=0A=0A> From:=0A> =0A> Michael Schmiedg= en =0A> =0A> To:=0A> =0A> Mark Felder , Albert Shih , =0A> pgsql-admin@postgresql.org, fre= ebsd-fs@freebsd.org, freebsd-jail@freebsd.org, =0A> =0A> Date:=0A> =0A> 23.= 10.2013 23:58=0A> =0A> Subject:=0A> =0A> Re: ZFS-FreeBSD + postgresql perfo= rmance=0A> =0A> Sent by:=0A> =0A> owner-freebsd-fs@freebsd.org=0A> =0A> On = 10/23/13 19:14, Mark Felder wrote:=0A> > On Wed, Oct 23, 2013, at 11:25, Al= bert Shih wrote:=0A> >> My question is about the performance, I known ZFS e= at all=0Amemory he can=0A> >> have (or almost), so what append when we run = database like=0Apostgresql and=0A> >> jail ? (it's also the reason of 96 Go= ram).=0A> >>=0A> >> Sorry for cross-posting but it's about 3 differents th= ings....=0A> >>=0A> >=0A> > To my understanding the solution is to change t= he primarycache=0Ato=0A> > "metadata" for any ZFS filesystem that you do no= t want=0AZFS to heavily=0A> > cache in memory.=0A> >=0A> > Example:=0A> >= =0A> > # zfs set primarycache=3Dmetadata tank/usr/local/pgsql=0A> =0A> In a= ddition to this it is recommended to set the recordsize=0A> to the fixed va= lue of 8k on dataset creation.=0A> =0A> Michael=0A> =0A=0AI would also reco= mmend to use 4K sector size using=0Agnop and zpool export/import.=0AI agree= that using fixed recordsize is a must when=0Ayou have databases and you ha= ve DB on each jail.=0AAlso there are a bunch of sysctl parameters you may= =0Awant to play with, mostly about tuning the memory usage.=0A=0AAlso it mi= ght be an idea to use partitions on disks=0Aand:=0A1. Use first 1-2G on eac= h disk for swap (just in case).=0A2. Use the rest of the disk for 4K aligne= d and 4K=0Asector size partition, labelled in some way (I use disk ID as la= bel, for=0Aeasy identification).=0A=0ABest regards,=0AIvailo Tanusheff=0A= =0A=0A=0ADISCLAIMER: The contents of this e-mail are intended for the named= addressee only. It contains information that may be privileged and/or conf= idential. Unless you are the named addressee or an authorized designee, you= may not copy or use it, or disclose it to anyone else. If you received it = in error please notify us immediately and then destroy it. Messages transpo= rted over the public Internet are susceptible to alteration. Raiffeisenbank= (Bulgaria) EAD, Raiffeisen Asset Management (Bulgaria) EAD, Raiffeisen Ins= urance Broker EOOD, Raiffeisen Services EAD, Raiffeisen Leasing Bulgaria OO= D, Raiffeisen Auto Leasing Bulgaria EOOD and Raiffeisen Real Estate EOOD sh= all not be liable for the message if altered, changed or falsified. =0A=0A= =D0=9E=D0=93=D0=A0=D0=90=D0=9D=D0=98=D0=A7=D0=95=D0=9D=D0=98=D0=95 =D0=9D= =D0=90 =D0=9E=D0=A2=D0=93=D0=9E=D0=92=D0=9E=D0=A0=D0=9D=D0=9E=D0=A1=D0=A2= =D0=A2=D0=90: =D0=A1=D1=8A=D0=B4=D1=8A=D1=80=D0=B6=D0=B0=D0=BD=D0=B8=D0=B5= =D1=82=D0=BE =D0=BD=D0=B0 =D1=82=D0=BE=D0=B2=D0=B0 =D0=B5=D0=BB=D0=B5=D0=BA= =D1=82=D1=80=D0=BE=D0=BD=D0=BD=D0=BE =D1=81=D1=8A=D0=BE=D0=B1=D1=89=D0=B5= =D0=BD=D0=B8=D0=B5 =D0=B5 =D0=BF=D1=80=D0=B5=D0=B4=D0=BD=D0=B0=D0=B7=D0=BD= =D0=B0=D1=87=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0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F. From owner-freebsd-jail@FreeBSD.ORG Fri Oct 25 16:19:55 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 171B473A; Fri, 25 Oct 2013 16:19:55 +0000 (UTC) (envelope-from prvs=101050af22=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC442162; Fri, 25 Oct 2013 16:19:54 +0000 (UTC) Received: from r2d2 ([82.69.141.170]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50006503893.msg; Fri, 25 Oct 2013 17:19:53 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 25 Oct 2013 17:19:53 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.141.170 X-Return-Path: prvs=101050af22=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: From: "Steven Hartland" To: "Patrick Dung" , , "Michael Schmiedgen" References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <1382716422.13782.YahooMailNeo@web193504.mail.sg3.yahoo.com> Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance Date: Fri, 25 Oct 2013 17:19:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: freebsd-fs@freebsd.org, pgsql-admin@postgresql.org, freebsd-jail@freebsd.org, owner-freebsd-fs@freebsd.org 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: Fri, 25 Oct 2013 16:19:55 -0000 ----- Original Message ----- From: "Patrick Dung" Sent: Friday, October 25, 2013 4:53 PM Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance >> I would also recommend to use 4K sector size using > > gnop and zpool export/import. This will have no effect, the ashift for a pool is set at creation. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-jail@FreeBSD.ORG Sat Oct 26 05:23:36 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C96E67CD for ; Sat, 26 Oct 2013 05:23:36 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm33-vm9.bullet.mail.sg3.yahoo.com (nm33-vm9.bullet.mail.sg3.yahoo.com [106.10.151.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3897A28E8 for ; Sat, 26 Oct 2013 05:23:35 +0000 (UTC) Received: from [106.10.166.63] by nm33.bullet.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:23:34 -0000 Received: from [106.10.150.29] by tm20.bullet.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:23:33 -0000 Received: from [127.0.0.1] by omp1030.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:23:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 943263.55737.bm@omp1030.mail.sg3.yahoo.com Received: (qmail 23919 invoked by uid 60001); 26 Oct 2013 05:23:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1382765013; bh=Mo3yxvxwwK/n+yKjTq5FeeXPaE+iNZZ5Tj3mx7NCXDw=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=lEjB3jN/mEBN1HejHDUF/pJLEDmA52L1BPQiSpnl1lzRLUibCWuayR9HEI3I1jKDNDevD0gWDldmASLEbU38XMqP1i3WaNzmGt4K2jaj3CVlQ2IVG0LeSSMlumRgfd+6Rl+C9vRKXuC79JY9NLlQbBmdcpPltpJ4gdOvTYojyCw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xt+Dj2pGACn36EvjozN2qHlqY4lA/U9H6vST07S6OmrWddqMd9J/bJqelG8BWJ4EhePB8Oi4LD3XuQj2V8+K85N5CaOvnQOJipGYk91z6xXk2J0cJx6M6U3SPZUpqNIDINkTsIm+6Hdi0mvdhwkFKWraIq9QSXHUlKxQ5gimL30=; X-YMail-OSG: _hhhqQsVM1lyy4P1tSWoK7QmRjD27b4qRZemOd8BVqKpNmn QjfNlPhAYzQRw4nh_fF230tonyrTkkcGTnIs1xaU4tYtUuM1w9lmRDZsCdAv c9gavmWYbSLFzTSRQrr4WjmxxpIphoMX8k3fkXdEHVK8KRaGsgu3JUspZMyg h7vChCfG7XWB1Zhb4b6Gr06LHUtyPDXpsbYodrqrOSVi9emCx7m0KqVefkJC 1S4ljOhxjHX1spL76Kpj0RPy81zig_ovHzb8o7VXD4nJ0JBpNJjHNlh7Xlgc Zwuwjeqf5zHugjpNSnEwd6ADvXJwfO6ju.6s6m0OnGt8rMhMfM6lQCepGu.G OR9_jSvkpTadU4eluGqbD3H1Gugvbzp3If9ElzhnfFxlszsE3MTyLlV.ggnY EOKmjMzAEFGdxiwBzZ2Qt0rpYay3NSvA5sBiAx0pohAegrSOUt142ggxfxgt 56ss_qOx2Ni9uoSH7MWV0tgQ.EYZdfg55yvpK9onCg.bOSoYJAU4Ote0WjK0 nidffZoGhJwcVaInZCXA.x58wrIrJM0PL0Ej0R1Q_g80136aRA0KczzJOh_X ZrTK06aw3ic_esSN_b5s- Received: from [61.15.240.133] by web193502.mail.sg3.yahoo.com via HTTP; Sat, 26 Oct 2013 13:23:33 SGT X-Rocket-MIMEInfo: 002.001, CgpPbiBTYXR1cmRheSwgT2N0b2JlciAyNiwgMjAxMyAxOjA0IEFNLCBTdGV2ZW4gSGFydGxhbmQgPGtpbGxpbmdAbXVsdGlwbGF5LmNvLnVrPiB3cm90ZToKIAotLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tIApGcm9tOiAiUGF0cmljayBEdW5nIiA8cGF0cmlja19ka3RAeWFob28uY29tLmhrPgpTZW50OiBGcmlkYXksIE9jdG9iZXIgMjUsIDIwMTMgNDo1MyBQTQpTdWJqZWN0OiBSZTogW0FETUlOXSBaRlMtRnJlZUJTRCArIHBvc3RncmVzcWwgcGVyZm9ybWFuY2UKCgo.PiBJIHdvdWxkIGFsc28gcmVjb20BMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <1382716422.13782.YahooMailNeo@web193504.mail.sg3.yahoo.com> Message-ID: <1382765013.22777.YahooMailNeo@web193502.mail.sg3.yahoo.com> Date: Sat, 26 Oct 2013 13:23:33 +0800 (SGT) From: Patrick Dung Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance To: Steven Hartland , "Ivailo.TANUSHEFF@raiffeisen.bg" , Michael Schmiedgen In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-fs@freebsd.org" , "pgsql-admin@postgresql.org" , "freebsd-jail@freebsd.org" , "owner-freebsd-fs@freebsd.org" X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 05:23:36 -0000 =0A=0AOn Saturday, October 26, 2013 1:04 AM, Steven Hartland wrote:=0A =0A----- Original Message ----- =0AFrom: "Patrick Dun= g" =0ASent: Friday, October 25, 2013 4:53 PM=0ASu= bject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance=0A=0A=0A>> I would = also recommend to use 4K sector size using=0A>=0A> gnop and zpool export/im= port.=0A=0AThis will have no effect, the ashift for a pool is set at creati= on.=0A=0A=A0 =A0 Regards=0A=A0 =A0 Steve=0A=0A=0A---------------------=0A= =0ATo be specific, I think the steps should be gnop create, create zfs pool= , export zfs, remove gnop and reimport zfs.=0AThis link have the deatils an= d steps: From owner-freebsd-jail@FreeBSD.ORG Sat Oct 26 05:24:27 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 3500786D for ; Sat, 26 Oct 2013 05:24:27 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm29-vm8.bullet.mail.sg3.yahoo.com (nm29-vm8.bullet.mail.sg3.yahoo.com [106.10.151.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72FFF28FA for ; Sat, 26 Oct 2013 05:24:26 +0000 (UTC) Received: from [106.10.166.125] by nm29.bullet.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:24:24 -0000 Received: from [106.10.151.170] by tm14.bullet.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:24:24 -0000 Received: from [127.0.0.1] by omp1010.mail.sg3.yahoo.com with NNFMP; 26 Oct 2013 05:24:24 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 132045.49110.bm@omp1010.mail.sg3.yahoo.com Received: (qmail 36799 invoked by uid 60001); 26 Oct 2013 05:24:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1382765063; bh=XhN/luD6GySM20955Al18hbmlaTTRJ0N6iJ3gTSWdic=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=y5pOGVfMW+b4j/CPpSg2BNho7/DI2HEb7Hw9SYZ1q4iGOs3lHBYFeUf+vnFt6trWr7CPDN5SMTRghOKSLvmOf/Do0Rctbf2z7ZMz8qeYAadkjr4N959IRsylmDGpnX8bEf2dEKEuV4fBuIIdbAWXxFFDojSY9MY62UIznihpfn4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=shWeDuwsO+RtugCTd8ACaeoL5vSXgTrKua/oYFF4otiZrQctr0ZtSevBW4ymBj+3B7QLUiSCxMmZiT2jno96N1V3Jm7122IFvjmdzvWKeUrGdhgcHqubDSygFd2bEJ6ajAtfCsGhor9eDFzmc5F86S0Ns3jyUgP98521s9WE/JM=; X-YMail-OSG: qw7EvoEVM1nXWr6ew5BfdYvLN7x1MUMP_zsmBdL0MCykLVV 8yoo2nzKOWI5i12sdIzzqfFdUlIc_xRwURjGcyiEOSopdogy6pfqkC_MTM20 m3vte8yVD7e2G2J3fVobo9KUtz5G_Df21tCuW_SlJdmWQ65zcS43KEJxzbjS BTy98g_gENdyRZ671lApAVPS2nhFAuwd6LZGZ.NlWisuW1y5_mo2tgiqvMCa QsLqiKGT6RKOsQJ2aMkuV2S5laQLQjCLKzLCREVGb_FlSHGBRebDyUnLzuqB inPra0G3zVuePimLIk9CHMTKM3Aacv_Epi3iMLBO0BUbt2l.YkcvsGDNKzNy 2foklJMpjMwmjS4f6AIIInuZsfmpJknAGlPkdXFueGm7TKivgC54L8fokJFx Fq.lvg312HiJbpzXI9LuSLSHlvHGSbaupvxRXmugd8IO10AL.CQpxHHrqRPE FCXtnmnPDv.FEo9ABZjI4aGB2jjIPlvEcfmw3bcRKEubojxOKPGjpm2MxJqG bQ3qXor3KT3EPQ0gZ3_uMqdJel.myz0KMkmR_XXjfCF_cj2ZCK72UQcdKMDN 90Lv56ugWyBBg2IQXJIVc30deLeUlexPhg2zNO5ZO2i_kDcMYZXq697j46HK 87T109S9yxB6l5IqGBgK7UZdTByNPCcVpqb6xB0IOwNlSl_5m5FLgb6U0__i gQ2QGYGePcgufTr33EdT8OTdIf03IqB5XiciDdA-- Received: from [61.15.240.133] by web193504.mail.sg3.yahoo.com via HTTP; Sat, 26 Oct 2013 13:24:23 SGT X-Rocket-MIMEInfo: 002.001, CgpPbiAsIFBhdHJpY2sgRHVuZyA8cGF0cmlja19ka3RAeWFob28uY29tLmhrPiB3cm90ZToKIAoKCk9uIFNhdHVyZGF5LCBPY3RvYmVyIDI2LCAyMDEzIDE6MDQgQU0sIFN0ZXZlbiBIYXJ0bGFuZCA8a2lsbGluZ0BtdWx0aXBsYXkuY28udWs.IHdyb3RlOgogCi0tLS0tIE9yaWdpbmFsIE1lc3NhZ2UgLS0tLS0gCkZyb206ICJQYXRyaWNrIER1bmciIDxwYXRyaWNrX2RrdEB5YWhvby5jb20uaGs.ClNlbnQ6IEZyaWRheSwgT2N0b2JlciAyNSwgMjAxMyA0OjUzIFBNClN1YmplY3Q6IFJlOiBbQURNSU5dIFpGUy0BMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <1382716422.13782.YahooMailNeo@web193504.mail.sg3.yahoo.com> <1382765013.22777.YahooMailNeo@web193502.mail.sg3.yahoo.com> Message-ID: <1382765063.35320.YahooMailNeo@web193504.mail.sg3.yahoo.com> Date: Sat, 26 Oct 2013 13:24:23 +0800 (SGT) From: Patrick Dung Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance To: Steven Hartland , "Ivailo.TANUSHEFF@raiffeisen.bg" , Michael Schmiedgen In-Reply-To: <1382765013.22777.YahooMailNeo@web193502.mail.sg3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-fs@freebsd.org" , "pgsql-admin@postgresql.org" , "freebsd-jail@freebsd.org" , "owner-freebsd-fs@freebsd.org" X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 05:24:27 -0000 =0A=0AOn , Patrick Dung wrote:=0A =0A=0A=0AOn Sa= turday, October 26, 2013 1:04 AM, Steven Hartland = wrote:=0A =0A----- Original Message ----- =0AFrom: "Patrick Dung" =0ASent: Friday, October 25, 2013 4:53 PM=0ASubject: Re: = [ADMIN] ZFS-FreeBSD + postgresql performance=0A=0A=0A>> I would also recomm= end to use 4K sector size=0A using=0A>=0A> gnop and zpool export/import.=0A= =0AThis will have no effect, the ashift for a pool is set at creation.=0A= =0A=A0 =A0 Regards=0A=A0 =A0 Steve=0A=0A=0A---------------------=0A=0ATo be= specific, I think the steps should be gnop create, create zfs pool, export= zfs, remove gnop and reimport zfs.=0AThis link have the deatils and steps:= =0AThe link is:=0A=0Ahttp://ivoras.sharanet.org/blog/tree/2011-01-01.freebs= d-on-4k-sector-drives.html=0A