LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   reducing emerge compile times (https://www.linuxquestions.org/questions/gentoo-87/reducing-emerge-compile-times-922431/)

nclinuxredneck 01-06-2012 11:25 AM

reducing emerge compile times
 
I was wondering if recompiling certaing programs incuded as binaries in a stage 3 install with optimized Cflags or anything similar would make a difference in compile times, or would that just be a complete tarbomb, stack-overflow, crashtastic, epic-fail/waste of time? What can I do to reduce compile times on older core2 or p4 systems per-say if anything at all? What are some simple (and safe) things that we can all do to reduce compile times (even if it only is by a small amount?) I know that you can distribute compiling to other systems on the LAN, but this isn't always an option, as we compile on different architectures and we dont all have 1000 node data-centers or large beowolf clusters in our homes or offices!

What do some of you guys do? Or do you just emerge and clock out or go to bed?

I have a feeling this thread will never end, sorry everyone.

MS3FGX 01-06-2012 08:44 PM

Outside of a cluster, the only realistic improvement I can think of is faster storage. Upgrade your machine with an SSD drive if possible, but if that's out of your price range you could alternately load it up with as much RAM as the motherboard can handle and compile out of a tmpfs volume.

If you take the storage bottleneck out of the equation, you should see a decent improvement in system performance across the board.

Of course, with older hardware and a limited upgrade path/budget, sometimes you just have to wait for it to chug through...

syg00 01-06-2012 08:54 PM

On my P4 I used to kick off emerges and go to bed.
Architecture makes so much difference. On an old quad Xeon server in the office, kernel compiles (non-gentoo) took forever. On my trusty q6600 at home, trundled through in way less time (both 4 Gig, using -j 5).
Basically suck it up and wait ...

I want to know why ?. What does gentoo offer in that realm that Arch doesn't ?.

nclinuxredneck 01-07-2012 02:41 AM

compile times, Arch vs Gentoo
 
RAM disk! Wow, I really seem to be closed-minded these days. That would definitely eliminate almost all of the IO constraints, and nowadays we have at least a gigabyte of RAM in most boxes, and compiling anything from the command line only uses 100mb or so. Wonderful idea.

As for the question about Arch vs Gentoo, you are exactly right, Arch allows building from source and actually has a better system than Gentoo does in my opinion, especially when it comes to kernel configuration, and install time. But, for some bizzare reason I just prefer Gentoo for production work (servers, etc.) because most of the software in the repos is right in that "just old enough to be stable, but not ancient" zone, Debain and CentOS are too far behind version-wise and Arch tends to be too far on the bleeding edge. Arch will always grace my desktop at home (probably for the rest of eternity) and you really can't beat it for everyday use. But I prefer Gentoo for servers and production work.

There's just something about Gentoo....

i92guboj 01-09-2012 04:14 PM

Well, arch is arch and Gentoo is Gentoo.

Gentoo with binaries would be, mostly, arch. But to tell the truth, the focus of both distros is different, and so is the focus of Sabayon and other Gentoo based distros. This has already been discussed a lot of times around the net and particularly in the Gentoo forums.

If you truly intend to improve the compilation times, there's nothing that you can do but to look on better hardware, distributed compilation and ccache (and sane USE and CFLAGS settings to constrain your binaries to the features you need and to get the best from your cpu, and I really mean "best" in the most conservative sense of the word, and not on the crazier/racier meaning of it).

If you want to use precompiled stuff, then you are not really talking about improving compilation times at all.

Ion Silverbolt 01-10-2012 10:22 AM

Arch makes for a quick install. Other than that, I prefer Gentoo. I like how easy it is to spin your own kernel. I can see why some would just want a complete and ready to go binary however. A matter of taste here. Also, if a package shows instability, it's very easy to try a different one. There is usually several versions to choose from in portage instead of just one. I use a combination of stable and unstable packages. I'm even using hard masked gcc-4.6.2. All on a fully working system. No other distro can give you that kind of flexibility other than maybe LFS.


As for your problem, setup a binhost. I compile all my packages and my kernel for my zacate netbook from my hex-core AMD desktop. I put it on a portable usb HD, so I can either plug it in the netbook, or mount it over sshfs. Much quicker method of installation.

There are Gentoo docs that tell you how to setup/install a binhost. It's worth the time if you want Gentoo but are tired of compile times. Especially if your desktop can compile Libreoffice in 20 minutes. :)

alan_ri 01-12-2012 02:46 PM

Quote:

Originally Posted by nclinuxredneck (Post 4568594)
As for the question about Arch vs Gentoo, you are exactly right, Arch allows building from source and actually has a better system than Gentoo does in my opinion, especially when it comes to kernel configuration, and install time.

Well, I would not agree. Gentoo, oh, allows building from source and actually Gentoo has a better system than Arch in my opinion, especially when it comes to kernel configuration, and install time.

Anyhow, as something to start with, you may read this; http://www.gentoo.org/doc/en/handboo...?part=2&chap=3

BTW, I have a feeling that Gentoo has one lovely documentation.

nclinuxredneck 01-25-2012 03:11 AM

RE-Compile times
 
Gentoo does have wonderful docs. Honestly, I hate to contradict myself here, but for a while I was a bit of an Arch fanboy. It was a really fun toy for while. But Gentoo's quality and customization is unprecedented. I really began to appreciate it more when my Arch box kept seg-fauting and my Gentoo box had 2 weeks uptime! I have discovered that in the long run, the compile times are worth it. For something like an HTPC playing 1080p video, Gentoo's CFlags and custom options make a big difference in performance as well as stability. I own my own IT consulting company and also am a repair tech on the side, and I wouldn't trust my business to anything other than the superior quality and stability of Gentoo. I can read exotic filesystems (UFS, OS2, HP-AIX, etc.) have good video performance, and excellent security (via hardened profile.) All the guys I work with use XP, and while they're looking at registry keys, trying to get third-party software just to read a HFS disk, and attempting to install device drivers that don't exist, I'm actually working!

Compile times are worth it!!! But having enough RAM is critical, as not enough can turn a 48min LibreOffice build into a 48hr Libreoffice build! And, guys, not preaching here, I am registered a newbie, but things go so much better when you ACTUALLY LOOK AT EBUILD FILES before you hit enter! It can save so many headaches later.


All times are GMT -5. The time now is 03:46 AM.