Originally posted by sdack
View Post
Announcement
Collapse
No announcement yet.
At Least 27% Of Gentoo's Portage Can Be Easily LTO Optimized For Better Performance
Collapse
X
-
Originally posted by skeevy420 View PostCan a Gentoo user answer a quick question for me -- Can Gentoo be installed/compiled up to a working desktop from a chroot on another Linux desktop (Manjaro in my case)?
What you do is this: Create a partition to become your gentoo root fs, put a filesystem on it, mount it somewhere. (if you're using btrfs, you can even share your existing root fs, by putting gentoo into a subvolume.) Then extract a stage3 tarball onto it (get it from https://www.gentoo.org/downloads/), setup a few things and chroot into it.
The few things thing to setup before chroot'ing are things like: copy over your /etc/resolv.conf to make DNS work, bind mount /dev /sys and /proc so that portage and certain packages can query things from your kernel etc. Nothing that complicated, here is a quick overview over the steps in more detail: https://wiki.gentoo.org/wiki/Chroot
If you've never built a gentoo box before, you should look at the install guide to learn more about how the install process works, and espeically to find out how to get from your chroot to something bootable (https://wiki.gentoo.org/wiki/Handbook:AMD64). You can skip the first 3 steps, since you already have a running OS, start at "preparing the disks".
- Likes 1
Comment
-
Originally posted by emerge-e-world View Post
Absolutely. In fact, it works the same way as if you were setting up a gentoo installation from a LiveCD. It does not have to be a gentoo system, all you need is some sort of working linux system that is capable of entering the chroot, give you network access and things like that.
What you do is this: Create a partition to become your gentoo root fs, put a filesystem on it, mount it somewhere. (if you're using btrfs, you can even share your existing root fs, by putting gentoo into a subvolume.) Then extract a stage3 tarball onto it (get it from https://www.gentoo.org/downloads/), setup a few things and chroot into it.
The few things thing to setup before chroot'ing are things like: copy over your /etc/resolv.conf to make DNS work, bind mount /dev /sys and /proc so that portage and certain packages can query things from your kernel etc. Nothing that complicated, here is a quick overview over the steps in more detail: https://wiki.gentoo.org/wiki/Chroot
If you've never built a gentoo box before, you should look at the install guide to learn more about how the install process works, and espeically to find out how to get from your chroot to something bootable (https://wiki.gentoo.org/wiki/Handbook:AMD64). You can skip the first 3 steps, since you already have a running OS, start at "preparing the disks".
I've attempted building Gentoo on some of my previous PCs, but usually around 3 days in something would break and doing it all from a terminal and a phone was a little discouraging...should have just followed my gut and did it all from a chroot but I was following the handbook to the letter...and not given up so easily...
The experience game me a lot of respect for the ones who did it all on older single and dual core systems for weeks at a time. Now with at least 150% more IPC, 4x the number of threads, & 6x the ram I expect it'll go a little faster this time .
Comment
-
Originally posted by skeevy420 View Post
I've attempted building Gentoo on some of my previous PCs, but usually around 3 days in something would break and doing it all from a terminal and a phone was a little discouraging...should have just followed my gut and did it all from a chroot but I was following the handbook to the letter...and not given up so easily...
Doing it in chroot's is how I'm always doing it these days. Especially when I want to bootstrap for a slower mashine, I tend to just build my root fs in a chroot on my desktop or server with lots of cores, then make a tarball of it and extract it onto the target mashine. If you're afraid of messing something up, it's quite useful to build it on btrfs and take snapshots in between the steps. That way you can always go back.
Originally posted by skeevy420 View PostThe experience game me a lot of respect for the ones who did it all on older single and dual core systems for weeks at a time. Now with at least 150% more IPC, 4x the number of threads, & 6x the ram I expect it'll go a little faster this time .
- Likes 1
Comment
-
Originally posted by hubicka View Post
Definitly not. But as a data point, Martin Liška has just finished experimental rebuild of OpenSUSE with GCC 9 and GCC 9 and LTO. Switching GCC8 to GCC9 increases binary sizes 8.42GB to 8.52GB (1.14%). I am looking into those packages that grew - it seems to me mostly for lapack, VLC and similar performance optimized stuff due to the fact that inline limits was increased in GCC9 to help performance of modern C++ stuff.
Enabling LTO reduces size to 3.92GB->3.71GB. So about 5% reduction. Note that the size includes things not built with GCC such as go which accounts for some of largest binaries on the distro.
Some large packages did not use system flags and we will need to rebuild those, so the differences will hopefully improve still. Only go, postgress and libqt-declarative which clearly disabled LTO accounts to 400MB of binaries and overall 700MB of binaries did not seem to change at all and thus needs to be looked at.
LTO also reduces debug info from 27.56GB to 22.73GB (17%). We will also look into the performance
Comment
-
Originally posted by ms178 View PostDoes the rebuild provide a chance to try more aggressive compiler flags like Graphite, PGO or is the current focus on LTO only?
As for Graphite, I have never had any worthwhile performance gains from it myself on the stuff I regularly benchmark (archivers, encoders, emulators, renderers).
- Likes 1
Comment
-
I was one of the survey respondents - rarely had any trouble with it (that wasn't self inflicted!). One bug I submitted a patch to turn off lto, another one the maintainer did within a few days.
I would be interested to know if those 5000 packages cover the 90% most used packages on Gentoo. I'm guessing so. 27% coverage doesn't seem like much, but on my desktop machine I have all sorts of weird stuff installed with a full kde desktop and it's only around 700 packages.
Comment
-
Originally posted by In_Between_Names View PostIndeed, Graphite needs work. Were more people to use it, more work would probably be done on it. In any case, users of GentooLTO are under no obligation to use Graphite. I provide easy instructions in the overlay such that you can customize your flags to your heart's content.
Comment
-
Originally posted by RealNC View PostIt should not be enabled by default.
So does -ffast-math (or -Ofast) as well as -fipa-pta need to be enabled by default, too. Anything that doesn't run with these options enabled then needs to be patched so it disables the options specifically for just the one package.Last edited by sdack; 19 April 2019, 09:15 AM.
- Likes 1
Comment
Comment