Idea: static builds

Andrew Pantyukhin infofarmer at FreeBSD.ORG
Sat Oct 6 11:57:44 PDT 2007

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 

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

More information about the freebsd-ports mailing list