Date: Fri, 25 Oct 2013 23:53:42 +0800 (SGT) From: Patrick Dung <patrick_dkt@yahoo.com.hk> To: "Ivailo.TANUSHEFF@raiffeisen.bg" <Ivailo.TANUSHEFF@raiffeisen.bg>, Michael Schmiedgen <schmiedgen@gmx.net> Cc: "owner-freebsd-fs@freebsd.org" <owner-freebsd-fs@freebsd.org>, "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>, "freebsd-jail@freebsd.org" <freebsd-jail@freebsd.org> Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance Message-ID: <1382716422.13782.YahooMailNeo@web193504.mail.sg3.yahoo.com> In-Reply-To: <OF0B1DBA74.B7B14575-ONC2257C0E.001EC20A-C2257C0E.00239411@LocalDomain> References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <OF0B1DBA74.B7B14575-ONC2257C0E.001EC20A-C2257C0E.00239411@LocalDomain>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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" <Ivailo.TANUSHEFF@raiffeisen.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 <schmiedgen@gmx.net>=0A> =0A> To:=0A> =0A> Mark Felder <feld@FreeBSD.org= >, Albert Shih <Albert.Shih@obspm.fr>, =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=D0=B5=D0=BD=D0=BE =D0=B5=D0=B4=D0=B8=D0=BD=D1=81=D1=82=D0=B2= =D0=B5=D0=BD=D0=BE =D0=B7=D0=B0 =D0=BF=D0=BE=D1=81=D0=BE=D1=87=D0=B5=D0=BD= =D0=B8=D1=8F =D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B0=D1=82=D0=B5=D0=BB. =D0=A1= =D1=8A=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=D1=82=D0=BE =D1=81=D1=8A= =D0=B4=D1=8A=D1=80=D0=B6=D0=B0 =D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0= =D1=86=D0=B8=D1=8F, =D0=BA=D0=BE=D1=8F=D1=82=D0=BE =D0=BC=D0=BE=D0=B6=D0=B5= =D0=B4=D0=B0 =D0=B1=D1=8A=D0=B4=D0=B5 =D0=BF=D1=80=D0=B5=D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=B8=D0=BD=D0=B3 =D0=91=D1=8A=D0=BB=D0=B3=D0=B0= =D1=80=D0=B8=D1=8F =D0=95=D0=9E=D0=9E=D0=94 =D0=B8 =D0=A0=D0=B0=D0=B9=D1=84= =D0=B0=D0=B9=D0=B7=D0=B5=D0=BD =D0=98=D0=BC=D0=BE=D1=82=D0=B8 =D0=95=D0=9E= =D0=9E=D0=94 =D0=BD=D0=B5 =D0=BD=D0=BE=D1=81=D1=8F=D1=82 =D0=BE=D1=82=D0=B3= =D0=BE=D0=B2=D0=BE=D1=80=D0=BD=D0=BE=D1=81=D1=82 =D0=B7=D0=B0 =D0=BC=D0=BE= =D0=B4=D0=B8=D1=84=D0=B8=D1=86=D0=B8=D1=80=D0=B0=D0=BD=D0=B8, =D0=BF=D1=80= =D0=BE=D0=BC=D0=B5=D0=BD=D0=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: <owner-freebsd-jail@FreeBSD.ORG> 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 <freebsd-jail@freebsd.org>; 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 <freebsd-jail@freebsd.org>; 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_hL8opVycekky8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: YahooMailWebService/0.8.160.587 References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <OF0B1DBA74.B7B14575-ONC2257C0E.001EC20A-C2257C0E.00239411@LocalDomain> Message-ID: <1382716427.9107.YahooMailNeo@web193503.mail.sg3.yahoo.com> Date: Fri, 25 Oct 2013 23:53:47 +0800 (SGT) From: Patrick Dung <patrick_dkt@yahoo.com.hk> Subject: Re: [ADMIN] ZFS-FreeBSD + postgresql performance To: "Ivailo.TANUSHEFF@raiffeisen.bg" <Ivailo.TANUSHEFF@raiffeisen.bg>, Michael Schmiedgen <schmiedgen@gmx.net> In-Reply-To: <OF0B1DBA74.B7B14575-ONC2257C0E.001EC20A-C2257C0E.00239411@LocalDomain> 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" <owner-freebsd-fs@freebsd.org>, "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>, "freebsd-jail@freebsd.org" <freebsd-jail@freebsd.org> X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Patrick Dung <patrick_dkt@yahoo.com.hk> List-Id: "Discussion about FreeBSD jail\(8\)" <freebsd-jail.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-jail>, <mailto:freebsd-jail-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-jail> List-Post: <mailto:freebsd-jail@freebsd.org> List-Help: <mailto:freebsd-jail-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-jail>, <mailto:freebsd-jail-request@freebsd.org?subject=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" <Ivailo.TANUSHEFF@raiffeisen.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 <schmiedgen@gmx.net>=0A> =0A> To:=0A> =0A> Mark Felder <feld@FreeBSD.org= >, Albert Shih <Albert.Shih@obspm.fr>, =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=D0=B5=D0=BD=D0=BE =D0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5=D0=BD=D0=B8=D1=8F. From owner-freebsd-jail@FreeBSD.ORG Fri Oct 25 16:19:55 2013 Return-Path: <owner-freebsd-jail@FreeBSD.ORG> 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: <DF66E5265C9A470A8EFABA893D5BE384@multiplay.co.uk> From: "Steven Hartland" <killing@multiplay.co.uk> To: "Patrick Dung" <patrick_dkt@yahoo.com.hk>, <Ivailo.TANUSHEFF@raiffeisen.bg>, "Michael Schmiedgen" <schmiedgen@gmx.net> References: <20131023162545.GA19794@pcjas.obspm.fr> <1382548465.32073.37624113.6AA8DB42@webmail.messagingengine.com> <52683855.6060609@gmx.net> <OF0B1DBA74.B7B14575-ONC2257C0E.001EC20A-C2257C0E.00239411@LocalDomain> <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\)" <freebsd-jail.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-jail>, <mailto:freebsd-jail-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-jail> List-Post: <mailto:freebsd-jail@freebsd.org> List-Help: <mailto:freebsd-jail-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-jail>, <mailto:freebsd-jail-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 25 Oct 2013 16:19:55 -0000 ----- Original Message ----- From: "Patrick Dung" <patrick_dkt@yahoo.com.hk> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1382716422.13782.YahooMailNeo>