From owner-freebsd-ports@FreeBSD.ORG Sat Oct 6 18:57:44 2007 Return-Path: Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 019A716A418 for ; Sat, 6 Oct 2007 18:57:44 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id C65CA13C457 for ; Sat, 6 Oct 2007 18:57:43 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from amilo.cenkes.org (ppp91-76-106-84.pppoe.mtu-net.ru [91.76.106.84]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTP id C979A2430145; Sat, 6 Oct 2007 22:58:41 +0400 (MSD) Date: Sat, 6 Oct 2007 22:57:40 +0400 From: Andrew Pantyukhin To: Diomidis Spinellis Message-ID: <20071006185739.GD19775@amilo.cenkes.org> References: <20071004190304.GA9491@hades.panopticon> <20071006150207.GA19775@amilo.cenkes.org> <4707D1E8.5000103@aueb.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4707D1E8.5000103@aueb.gr> X-OS: FreeBSD amilo.cenkes.org 7.0-CURRENT FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Dmitry Marakasov , freebsd-ports@FreeBSD.ORG Subject: Re: Idea: static builds X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2007 18:57:44 -0000 On Sat, Oct 06, 2007 at 09:20:24PM +0300, Diomidis Spinellis wrote: > Andrew Pantyukhin wrote: >> On Thu, Oct 04, 2007 at 11:03:04PM +0400, Dmitry Marakasov wrote: >>> Hi! >>> >>> I just have an idea that may be useful: static port builds. This can >>> help produce packages without any depends, which may be useful >>> sometimes. >> What I'd like to see first is some quantitative research on the >> benefits of it. Static builds are a lot more headache than one >> could imagine from a number points of view. > > I can give you quantitative data on the benefits of shared objects. On a > web server running FreeBSD 6.2 I found 98 shared objects sharing 16,790,901 > bytes of memory through 1,002 mappings. > Without shared libraries the corresponding binaries would require > 198,815,270 bytes - an order of magnitude more. > > On freefall I found 58 shared objects sharing 11,285,262 bytes of memory > through 2,127 mappings. Without shared libraries the corresponding binaries > would require 515,107,268 bytes - 50 times more. > > These are not just memory savings, but, more importantly on a modern > system, they contribute to improved locality in the code cache. > > I've put the Perl script I used for obtaining these figures at > http://www.spinellis.gr/blog/20071006/ Cool :) Here's what I get on our hosting server (lots of PHP FastCGI processes): 115 shared objects sharing 23242679 of memory with 11800 mappings. Without shared libraries 4806500943 bytes would be needed.