From owner-freebsd-ports@FreeBSD.ORG Sat Oct 6 18:39:18 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 595B416A417; Sat, 6 Oct 2007 18:39:18 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out-05.forthnet.gr (mx-out.forthnet.gr [193.92.150.103]) by mx1.freebsd.org (Postfix) with ESMTP id BEF7713C459; Sat, 6 Oct 2007 18:39:17 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-03.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-05.forthnet.gr (8.13.8/8.13.8) with ESMTP id l96IKg8H010700; Sat, 6 Oct 2007 21:20:42 +0300 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-03.forthnet.gr (8.14.1/8.14.1) with ESMTP id l96IKfff008707; Sat, 6 Oct 2007 21:20:41 +0300 Received: from [192.168.136.22] (ppp106-45.adsl.forthnet.gr [194.219.255.45]) by MX-IN-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id l96IKe2B013166; Sat, 6 Oct 2007 21:20:41 +0300 Authentication-Results: MX-IN-04.forthnet.gr smtp.mail=dds@aueb.gr; spf=neutral Authentication-Results: MX-IN-04.forthnet.gr header.from=dds@aueb.gr; sender-id=neutral Message-ID: <4707D1E8.5000103@aueb.gr> Date: Sat, 06 Oct 2007 21:20:24 +0300 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: infofarmer@FreeBSD.ORG References: <20071004190304.GA9491@hades.panopticon> <20071006150207.GA19775@amilo.cenkes.org> In-Reply-To: <20071006150207.GA19775@amilo.cenkes.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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:39:18 -0000 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/ Diomidis Spinellis - dds@