Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 2010 20:55:08 +0700
From:      =?UTF-8?B?IkMuIEJlcmdzdHLDtm0i?= <cbergstrom@pathscale.com>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Speeding up (caching?) shared libraries loading
Message-ID:  <4C7D09BC.7050806@pathscale.com>
In-Reply-To: <i5j0rs$7vq$1@dough.gmane.org>
References:  <4C7CF944.7030709@netfence.it> <i5j0rs$7vq$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote:
> On 08/31/10 14:44, Andrea Venturoli wrote:
>> Hello.
>>
>> Suppose I have an executable which I need to invoke repeatedly (e.g. to
>> run tests in a makefile).
>> This executables spend most of its time loading (rather than
>> processing), due to the need of several huge shared libraries.
>>
>> I'd welcome an hint on how to speed this up.
>> Possible thing would be to "cache" these shared libraries (and possibily
>> the executable too) in memory, so that any invocation after the first is
>> faster.
>> Is this possible at all?
>
> Normal file system caching will cover this case (unless you have very 
> little memory available). The only other thing you might do to speed 
> this up is prebinding / prelinking but if you are often rebuilding the 
> project it might not help.
With the PathScale compiler we tightly integrate hugetblfs support on 
linux.  (At some point we'll likely adapt this approach to work with 
FBSD superpages)  It can provide significant speed-up in some cases.  
(Like the initial loading of Firefox and some SPEC benchmarks)  I would 
give that a try and see what sort of results you get..  (Not exactly 
what you were asking about, but could help)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C7D09BC.7050806>