From owner-freebsd-questions@FreeBSD.ORG Tue Aug 31 13:20:02 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 210E510656B2 for ; Tue, 31 Aug 2010 13:20:02 +0000 (UTC) (envelope-from arundel@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0FEB68FC17; Tue, 31 Aug 2010 13:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7VDK1tc016505; Tue, 31 Aug 2010 13:20:01 GMT (envelope-from arundel@freefall.freebsd.org) Received: (from arundel@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7VDK1FO016498; Tue, 31 Aug 2010 13:20:01 GMT (envelope-from arundel) Date: Tue, 31 Aug 2010 13:20:01 +0000 From: Alexander Best To: Andrea Venturoli Message-ID: <20100831132001.GA15235@freebsd.org> References: <4C7CF944.7030709@netfence.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C7CF944.7030709@netfence.it> Cc: freebsd-questions@freebsd.org 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:20:02 -0000 On Tue Aug 31 10, 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? > Any other idea? i don't think there's an out-of-the-box solution. have you checked out ports to see if there's something there which might do what you're looking for? another possibility would be to use tmpfs and store the files and libraries on a memory based partition. you could write a script which would copy files/libs to the tmpfs partition during boot time e.g. cheers. alex > > bye & Thanks > av. -- a13x