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