From owner-freebsd-questions@FreeBSD.ORG Tue Aug 31 13:42:32 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31A5A10656BB for ; Tue, 31 Aug 2010 13:42:32 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id DD73C8FC1C for ; Tue, 31 Aug 2010 13:42:31 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OqR6Z-0008Os-Qd for freebsd-questions@freebsd.org; Tue, 31 Aug 2010 15:42:27 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2010 15:42:27 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2010 15:42:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Tue, 31 Aug 2010 15:42:21 +0200 Lines: 19 Message-ID: References: <4C7CF944.7030709@netfence.it> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: <4C7CF944.7030709@netfence.it> X-Enigmail-Version: 1.0.1 Subject: Re: Speeding up (caching?) shared libraries loading X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 13:42:32 -0000 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.