From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 19 22:32:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7126F16A41F for ; Thu, 19 Jan 2006 22:32:37 +0000 (GMT) (envelope-from gthorpe@myrealbox.com) Received: from fe2.ryerson.ca (fe2.ryerson.ca [141.117.101.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id B76EC43D4C for ; Thu, 19 Jan 2006 22:32:36 +0000 (GMT) (envelope-from gthorpe@myrealbox.com) Received: from conversion-daemon.fe2.ryerson.ca by fe2.ryerson.ca (iPlanet Messaging Server 5.2 HotFix 2.02 (built Oct 21 2004)) id <0ITD004011Y4WC@fe2.ryerson.ca> (original mail from gthorpe@myrealbox.com) for freebsd-hackers@freebsd.org; Thu, 19 Jan 2006 17:32:35 -0500 (EST) Received: from [192.168.5.19] (fw.rnet.ryerson.ca [141.117.3.201]) by fe2.ryerson.ca (iPlanet Messaging Server 5.2 HotFix 2.02 (built Oct 21 2004)) with ESMTPS id <0ITD001ZV2MBE7@fe2.ryerson.ca>; Thu, 19 Jan 2006 17:32:35 -0500 (EST) Date: Thu, 19 Jan 2006 17:32:58 -0500 From: Gary Thorpe In-reply-to: <79e2026f0601191215p117d78ebjbee2c4b710075154@mail.gmail.com> To: Ashok Shrestha Message-id: <43D0139A.1040601@myrealbox.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en, en-us User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 References: <79e2026f0601142345x1a9269bdl3153d1bb110be08d@mail.gmail.com> <86ek34d35f.fsf@xps.des.no> <17359.49899.183831.844670@bhuda.mired.org> <86k6cww445.fsf@xps.des.no> <20060119175224.GA71633@csh.rit.edu> <79e2026f0601191215p117d78ebjbee2c4b710075154@mail.gmail.com> Cc: Dag-Erling Sm?rgrav , Brandon Flowers , Mike Meyer , Wesley Shields , freebsd-hackers@freebsd.org Subject: Re: speed up port compiling using RAM (tmpfs) ??? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2006 22:32:37 -0000 Ashok Shrestha wrote: > I mounted part of RAM as such: > > mdmfs -s 500m md /mnt > > Then put WRKDIRPREFIX=/path/to/md in /etc/make.conf. > > It substantially reduces compile time by about 5-10 times. > > > Thanx to all ur replies. > > -Ashok Shrestha An alternative is to try using the "-pipe" flag with GCC: this eliminates the need to use some temporary files by using a unix pipe for IPC. Setting another flag "-j 2" will allow 2 jobs to be done at the same time and should eliminate (by hiding) the I/O delays (this slows down the CPU slightly because of more task switches, but even with one job there are still lots of generated tasks). If you combine these, you should see your compilations becoming CPU-bound.