Gentoo, Optimization over Time? Can someone tell me the benefits of compiling time?
GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Gentoo, Optimization over Time? Can someone tell me the benefits of compiling time?
Apart of my plan is to get Gentoo up and running efficiently after I use Slackware for a time, strictly for experience, and then proceed to BSD for other UNIX fun. Still, what I'm a bit confused on is the compiling of packages that can add up to an hour, or even a day *On desktop environments* of time. I am in no way criticizing Gentoo, nor Sabayon Linux *Which is the distro I was planning on installing to replace Ubuntu on my desktop* but the update time is extremely long compared to other distros. When "Optimizing" the packages, what does it optimize? Would compiling a desktop environment from the source make it run smoother, faster, and make it more stable? If so, I kind of like that fact, but it seems as though if you're in a hurry, updating your computer is the worst thing to do, while on Ubuntu even if I'm about to leave, it only takes around 5 minutes.
Once again, I am not putting down Gentoo, I just want to know what the true benefits are and if they're significant enough to stand out.
Also, I'm not especially installing Gentoo, but I'm referring to Gentoo because it's supposed to be based on Gentoo. Also, there's no Sabayon forum, so...
Hi, even as an avid Gentoo user, I don't suppose that the speed optimisations are of any consequence anymore (5 years ago it might've been a different story). It optimises the generated assembly code : eg by passing the "native" cflag to gcc, it optimises the resultimng binary for your processor (eg using sse4 if available).
The main advantage I see is customization : using the power of use flags, I get exactly the system I want... The rolling release philosophy is a must for me now : no tedious reinstalling of the OS, just an upgrade with (sometimes) a guide to follow.
With Gentoo, upgrading is not something to be done lightly (in a hurry). First the compilation itself takes time. If its a bigger upgrade, then some troubleshooting might be needed. From what I know, Sabayon also uses some sort of binary package format, so I don't have a good idea of how it works (the upgrade time should be shorter though)...
This is more of a generic answer - compilers can optimise the resulting executable based on the capabilities of your specific cpu, and this will provide a speed increase not an increase in stability. I think a lot of people go through the "self compile" stage because it's a great idea to get the best performance possible on your machine, but in the end most people are lazy and impatient and don't want to spend the time to do this regularly so they opt for a precompiled distro.
If you need to get the utmost performance from your machine then it's worth the time optimising the compilation.
This is more of a generic answer - compilers can optimise the resulting executable based on the capabilities of your specific cpu, and this will provide a speed increase not an increase in stability. I think a lot of people go through the "self compile" stage because it's a great idea to get the best performance possible on your machine, but in the end most people are lazy and impatient and don't want to spend the time to do this regularly so they opt for a precompiled distro.
If you need to get the utmost performance from your machine then it's worth the time optimising the compilation.
That sounds amazing, but as of now, running Sabayon in a Virtual Box for an hour, after upgrading and a reboot, there were a lot of problems with programs not running, I couldn't use emerge at all for some reason, and other basic commands didn't work either, something about a "Backend problem" and it had "serious" in it as well. Either a bad install or just a bug. Either way, if anything I'd install Gentoo and customize it myself so I'd know what I was doing and knew how to fix it, but in Sabayon I'm not sure. Another thing I like about the Gentoo-Based Distro is that it gives well-informed error output instead of a simple one with ambiguity to it, but it doesn't tell me how to fix it.
Apart of my plan is to get Gentoo up and running efficiently after I use Slackware for a time, strictly for experience, and then proceed to BSD for other UNIX fun. Still, what I'm a bit confused on is the compiling of packages that can add up to an hour, or even a day *On desktop environments* of time. I am in no way criticizing Gentoo, nor Sabayon Linux *Which is the distro I was planning on installing to replace Ubuntu on my desktop* but the update time is extremely long compared to other distros. When "Optimizing" the packages, what does it optimize? Would compiling a desktop environment from the source make it run smoother, faster, and make it more stable? If so, I kind of like that fact, but it seems as though if you're in a hurry, updating your computer is the worst thing to do, while on Ubuntu even if I'm about to leave, it only takes around 5 minutes.
Once again, I am not putting down Gentoo, I just want to know what the true benefits are and if they're significant enough to stand out.
Also, I'm not especially installing Gentoo, but I'm referring to Gentoo because it's supposed to be based on Gentoo. Also, there's no Sabayon forum, so...
I've done a little bit of assembly programming in the past, and from what I know: There is in most cases likely going to be some savings, but not much. The compiler can use some of the newer instructions in funny ways to replace three or four other instructions here and there. But on a desktop system where your processor does a billion instructions a second, you are likely not to see much difference.
What I'm not sure about, though, is multimedia applications (like VLC) where advanced multimedia instructions potentially make a huge difference. I know in Gentoo such instruction usage is compiled in according to your USE flags settings, but I'm not sure how that is handled in the binary-based distros. That would be something to look into.
To answer your other question: There are a lot of other reasons to use Gentoo besides optimization. You can read my short article:
glibC is how old? almost 40? Am I wrong? How can you not see a benefit to optimizations and compiling over time. I always compile binutils until it's smooth? I (the builder) want(s) all the MATH involved in these libraries...those translate to functions. And only those useable as determined by a proper (-march=native) GCC for binary (-Os) assembly. X86_64 is not true amd64. Intel chips are not AMD chips. Same math but different binary implementation per chip family, since your looking for streamlining in your source OS...recompiling with optimizations giving your x clocks per instruction decrease over clocks execution, varying on function optimized, is still a whole lot of register bus freed up regardless. Now perhaps same obtainable ratio per dwarf or thread. Dare I say my recipe includes other oldies like GHC & ocaML(ton) over 25x compiles (kitchen sink)?!?! And I just have that sneaking suspicion that Con put some mind-storm code in there somewhere.... GCC (compiler collection) emerges into an amazing compiler after glibc is fleshed out.
GDB is icing on the cake. I had more bugs squished including it in my global CFLAGS, which also need compiling in.
I wish Microsoft would build separate w/ optimizations for each manufacture...then benchmark.
If you are running Gentoo because of the speed, then you are probably in the wrong place.
While it's possible to get some optimization out of this stuff, it's often negligible in real world situations, and often per-package well-thought optimizations and chunck of assembly code do far more than using the craziest gcc flag.
Gentoo is just so flexible that you're gotta love it for that, plus it's naturally gifted to work as a development environment; but only a faster processor will run programs faster. If that's what you want, really, save the bucks you are gonna spend in electricity and buy a faster machine some day the next year.
I dunno, I thought there would be others with my mind set (and personal results) out there. I have minimized my CFLAGS and more importantly USE flags. Optimizations come from -march=native & -Os...stay in register space as much as possible and avoid casheland as much a possible like disk i/o. My argument is more promoting Compiling over time, and that it's finally worth the electricity consumed... coming from LFS to a fleshed out distro. There are results that are obvious, and cooking is necessary to get that flexibility desired molded into shape. When I first explored Gentoo, Debian (Sarge) won out because it was just a pain to spend so much time compiling. Now, I believe, with increase in PARALLEL processing (more so than increased clock speed) MAKEOPTS=-j9 is feasible and makes true tailoring possible for the hobbyist. You need to cook your installation. Sabayon is named after a recipe, thus implying Fabio cooks his source, whatever packages he includes in the his egg flann pastry craziness.
You can keep your static LLVM, I like the evolving compiler collection GCC, especially pulling in real debug info and build.log(s). & yes I've built a Gentoo Dragon from a GCC/LLVM dragonegg.
Oh well,
~Jux
"Hi Ho! It's off to work we go" - Dwarfs
From ubuntu xubuntu debian fedora arch and finally gentoo I can tell you if you've ever had to make a custom software package it would be preferred to use a source based distro. as far as compiling time it is not worth it. but making that software package the way you need it might be worth the 150% extra time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.