From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1Dub1F-0001yM-8J for garchives@archives.gentoo.org; Mon, 18 Jul 2005 19:11:13 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j6IJ9UG4013403; Mon, 18 Jul 2005 19:09:30 GMT Received: from smtp105.mail.sc5.yahoo.com (smtp105.mail.sc5.yahoo.com [66.163.169.225]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j6IJ2WNa008670 for ; Mon, 18 Jul 2005 19:02:33 GMT Received: (qmail 39531 invoked from network); 18 Jul 2005 19:03:22 -0000 Received: from unknown (HELO ?192.168.50.105?) (richard?j?fish@212.180.33.26 with plain) by smtp105.mail.sc5.yahoo.com with SMTP; 18 Jul 2005 19:03:21 -0000 Message-ID: <42DBFDA8.10005@asmallpond.org> Date: Mon, 18 Jul 2005 21:06:16 +0200 From: Richard Fish User-Agent: Mozilla Thunderbird 1.0.5 (X11/20050715) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Howto speed up compilations References: <20050718170738.GA5538@may.frognet.net> <20050718171913.GB5538@may.frognet.net> <42DBECFD.5060506@gmail.com> In-Reply-To: <42DBECFD.5060506@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 85d589fd-dfb6-47cd-b24f-50b9dd7755cc X-Archives-Hash: c2ca880814b8d2ba11b4216bec63e15a Zac Medico wrote: > John J. Foster wrote: > >> >> OK, this happens all the time. I search, can't find what I want, post a >> question, search again, and there it is. This is not the "thread" I was >> talking about, but it was right in front of me on the Gentoo Wiki. >> http://gentoo-wiki.com/TIP_Speeding_up_portage_with_tmpfs >> >> Does anyone have any "tips" on these "tips"? >> > > I sincerely doubt that this technique is worth the trouble because the > Linux virtual memory system will automatically cache frequently > accessed files in ram. The tmpfs will eliminate filesystem overhead > and will certainly result in a reduction of total build time. > However, I'd go with Bruno's recommendation and just put -pipe in the > cflags. For builds that work well in parallel, which most large > builds do, distcc is a great way to speed things up. > > Zac I'm a bit dubious about this well...unless you have a huge amount of memory (as in, more than 2G). But even then, if you have sufficient RAM, most of the source files should still be in memory as a result of the extraction of the source archive before compilation. And if buffers get flushed/recycled as a result of the compilation, that generally means that the compiler needed a large amount of memory, and giving the compiler your RAM is a much better choice, as otherwise swap has to be used, and that will *kill* your compilation time! That isn't to say that I don't think some smart and simple things beyond -pipe can speed up builds. I believe /var should be it's own filesystem, about 5G in size, and positioned just before /usr if you have one, or just after / if not. The filesystem should be either XFS (caches files in memory very agressively, and in fact doesn't even update the disk for short-lived temporary files) or reiserfs v3 (creates and deletes files very very quickly). However, I can pretty much guarantee that nothing short of a 16-processor, 16GB system (or a distcc farm, as Colin suggested) will allow you to "emerge -Dv --emptytree kde-meta" in 15 minutes!!! There is simply no getting around the CPU and memory bandwidth required for compiling! -Richard -- gentoo-user@gentoo.org mailing list