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

--
[email protected] mailing list

Reply via email to