From owner-freebsd-performance@FreeBSD.ORG Mon Dec 31 09:34:32 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCC08E18 for ; Mon, 31 Dec 2012 09:34:32 +0000 (UTC) (envelope-from paul.maulberger@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by mx1.freebsd.org (Postfix) with ESMTP id 411028FC0C for ; Mon, 31 Dec 2012 09:34:32 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.1]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MCNfL-1TgZL41EC9-0099eB for ; Mon, 31 Dec 2012 10:34:31 +0100 Received: (qmail 26034 invoked by uid 0); 31 Dec 2012 09:34:31 -0000 Received: from 178.0.84.98 by www063.gmx.net with HTTP; Mon, 31 Dec 2012 10:34:29 +0100 (CET) Content-Type: text/plain; charset="utf-8" Date: Mon, 31 Dec 2012 10:34:29 +0100 From: "Paul Maulberger" Message-ID: <20121231093429.22540@gmx.net> MIME-Version: 1.0 Subject: FreeBSD 9.1 and how to map the libraries form gcc47? To: freebsd-performance@freebsd.org X-Authenticated: #143783428 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18WjFw6CHoW1FvEuNvTS4QckE7ssjUgLqP5bJFTnn 6fcGGTcCRNIH2Imyj9OVctEvFiRvg8IN9VUg== Content-Transfer-Encoding: 8bit X-GMX-UID: cjmTcKppeSEqMGWV+nwhyx5+IGRvb4B9 X-Mailman-Approved-At: Mon, 31 Dec 2012 12:31:39 +0000 Cc: mm@FreeBSD.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 09:34:32 -0000 Hi folks, I'm using FreeBSD 9.1 Release with custom kernels. Kernel and userland are compiled with the base compiler (gcc 4.2.1). My whole project needs a few fast servers. If I compile my own source and libgmp with gcc47 (and optimization for XEON Sandy-Bridge) my executables are significant faster. Compared to gcc42 I would save money as I need fewer servers. My first goal is a very stable system, after that a fast one. Using the same library in different versions (e.g. /usr/lib/libgcc_s.so.1 and /usr/local/lib/gcc47/libgcc_s.so.1) makes me a little bit nervous. The following links are a good starting point. http://www.freebsd.org/doc/en/articles/custom-gcc/article.html http://forums.freebsd.org/showthread.php?t=28054 Following '3.2 Adjusting libmap.conf' from the first link I should map all gcc libraries to the new ones. So that every executable (also userland) will use the libraries from gcc47. Is that safe? In the second link the ld option 'rpath' is mentioned. Now I have a few alternatives: a) Always use gcc 4.2.1 and buy enough hardware. The other options are risky. b1) Compile only the own projects and libgmp with gcc47 and use the rpath option. b2) Compile only the own projects and libgmp with gcc47 and use mapping with /etc/libmap.conf only for own project executables. b3) Compile only the own projects and libgmp with gcc47 and use mapping with /etc/libmap.conf for all executables. c1) Compile own projects and all ports with gcc47 and use the rpath option. c2) Compile own projects and all ports with gcc47 and use mapping with /etc/libmap.conf only for own project executables and port executables. c3) Compile own projects and all ports with gcc47 and use mapping with /etc/libmap.conf for all executables. d) Switch the base compiler to gcc47 and recompile kernel, userland, ports and own projects. e) Other alternative. Which way should I go? Thanks for your comments and a happy new year. Regards Paul From owner-freebsd-performance@FreeBSD.ORG Mon Dec 31 17:07:48 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A503053B; Mon, 31 Dec 2012 17:07:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 267E58FC0A; Mon, 31 Dec 2012 17:07:47 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBVH7iWY053606; Mon, 31 Dec 2012 19:07:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBVH7iWY053606 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBVH7iJu053605; Mon, 31 Dec 2012 19:07:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 Dec 2012 19:07:44 +0200 From: Konstantin Belousov To: Paul Maulberger Subject: Re: FreeBSD 9.1 and how to map the libraries form gcc47? Message-ID: <20121231170744.GP82219@kib.kiev.ua> References: <20121231093429.22540@gmx.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kPvmKZRaHW6UEX9w" Content-Disposition: inline In-Reply-To: <20121231093429.22540@gmx.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-performance@freebsd.org, mm@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 17:07:48 -0000 --kPvmKZRaHW6UEX9w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 31, 2012 at 10:34:29AM +0100, Paul Maulberger wrote: > Hi folks, >=20 > I'm using FreeBSD 9.1 Release with custom kernels. Kernel and userland ar= e compiled with the base compiler (gcc 4.2.1). >=20 > My whole project needs a few fast servers. If I compile my own source and= libgmp with gcc47 (and optimization for XEON Sandy-Bridge) my executables = are significant faster. Compared to gcc42 I would save money as I need fewe= r servers. >=20 > My first goal is a very stable system, after that a fast one. >=20 > Using the same library in different versions (e.g. /usr/lib/libgcc_s.so.1= and /usr/local/lib/gcc47/libgcc_s.so.1) makes me a little bit nervous. >=20 > The following links are a good starting point. > http://www.freebsd.org/doc/en/articles/custom-gcc/article.html > http://forums.freebsd.org/showthread.php?t=3D28054 >=20 > Following '3.2 Adjusting libmap.conf' from the first link I should map al= l gcc libraries to the new ones. So that every executable (also userland) w= ill use the libraries from gcc47. Is that safe? >=20 The libgcc in base was supposed to be ABI-compatible with the stock libgcc from the corresponding version of the compiler. Assuming gcc project keep the ABI stability of the supplied libraries, it should be fine. --kPvmKZRaHW6UEX9w Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ4cZfAAoJEJDCuSvBvK1BrPQP/3b0eXAMOvgNE0AzikF+GnTQ VHbfAKOkPKvSMcZl8lfRhwUQDSHMgrUARdhFAzNA24yHjj2Fo1EkFaUM8mjI5zNd Mvr3h+DCu7dpOyMdYbGuSY5qlD6qtIOzFVTcxrLB44PAWUoiQhYC5WUMsC/Ny7Xb AmgFaPw/rBOhF3NnkJ+IaKf7jAl3bJxtXR/BH4KGuUBYhUs2wkPKukF0Dt1CAwI5 b/yIGtYXHzceu9dtPLduYbGXg3N6jJHuBPvzUWllu38GQgFYT++4Oc0KAqZ+mGma FP4ycY6FrLoD4+tXodBIsa7uYKTGrAfnb5HXqCYe0leVLHKzPAmk+ab48TPbm3+g eK0zYhCu7ooSAtKqXHano89awCV+xWKU2Poe2xvk0XJRYyUTUjWgZL116NbbgfPb 6K6h0qqhazieJ+CSiUDlHiUBr4z6lxw4i5KtqFngzGndLtXlPbMqWfA1L8uO11+a +ouB1loCOJXnS7/EPjIP2rI0yMltES+30CZrG0LtlNrSXPKK3stu6HnrP7Q9VmbJ zmLRltB2IyHO3SLY2Oqry+9AGhTNCDzIRwqYYhT1N7/uKftRUa4Hkrvswjnn5UZz I8lDHAggFVjHGSy0Jh0m+/AcozHyqNtK0HgmgOD+Y/Yu/Os65TpjwrxTtXigHbOG R79MEyidNsBrRsAmyiWl =C1g1 -----END PGP SIGNATURE----- --kPvmKZRaHW6UEX9w--