hi folks. i really want to get to the bottom of this as i feel like it will be insightful to others too. moving from debian to gentoo and setting very reasonable performance flags (only -O2 -march=native) i suffered 10% performance degradation both for cpu and graphics (tested on several benchmarks), on the same machine of course
i'm trying to change something here and there to see if it would make a difference, but nothing seems to matter. what could be some root causes of this? i use this machine for intensive computing, and i would like every drop of perf i can get. every finding will be relayed to the repo maintainers of course
#Performance degradation over other distros
1 messages ยท Page 1 of 1 (latest)
start by diffing your kernel config to a debian one
and o2 and o3 are real comparable, you can also try to tune stuff for your processor arch
sometimes optimizations can make code slower
i'm using o2, which is the default build flag for debian packages tho
this is a massive rabbit hole, but you would probably want to see if a debian like kernel will compare better or worse, then you know it's kernel related
and what benchmarks say they are slower?
good advice, thanks. better yet, i'll use one of the kernels from zen or liquorix so if that doesn't change anything it can't be it
try the gentoo binpkgs
yeah so many things affect system perf
it could be a difference in scheduler choice
so many things
passmark software for cpu, and unigine superposition + several game demos for graphics
how are you running the games?
that's a fair point, but my hope is that since this drop is consistent in every aspect, it could be related to one thing only, like the kernel
I wonder if it's the lackof lto
could be it
i have the lto and pgo flags enabled globally
does it not mean that every package that could be emerged with lto will be?
if the package has a use flag for that sure
but setting it in your compiler flags makes gcc or whatever always try to use that
better keep that off and use it as last resort
if i really can't find it
ok i'll try a kernel first and i'll keep you posted
am i the only one suffering from this problem?
debian has lto on by default is what we are trying to say
i didn't know that, thank
check the kernel fitst though
that could very well be it
lto will make a larger difference than o2 vs o3 i think
and in gcc o3 is mostly useful for finding bugs lol
but how does a packaged structure even work with lto i wonder
it could do, it might not
try the kernel first
alright, off to do that
but yes if you want to see if lto speeds up everything then you wil need to rebuild everything
unrelated, but emerge --depclean does not remove old kernel entries, nor the kernel cleaner utility (even after grub update)
not really recommended
i needed to do that eventually
i have a really barebone system
so it will take a couple hours tops
it doesn't delete rom /boot only the sources
installkernel handles what you want I beilve
use binpkgs to keep your sanity
won't work if they want lto
they don't work at all?
it won't be built with lto
if you make your own binpkg?
oh in that case it will but how does that help
I see where you are going
yeah, if only the gentoo premade packages had lto
good idea, just needed a better explanation ๐
yes ๐
we need more testers for lto to get that
i can provide
how unmanageable is lto on gentoo? i don't consider gentoo that high maintainance
but i've heard this flag can be
or was it graphite?
LTO is fine it's the GentooLTO overlay which is broken
deviating from standard gcc with default emerge settings is going to cause more trouble as a rule of thumb, but i've had no issues using lto
I alredy showed you how to do LTO correctly
yes, thanks
and i believe lto breaking like that wold be a compiler issue, not a gentoo issue in particular right
when first approaching this i was sucked into the lto overlay rabbit hole
i thought it was the only way
I wrote the docs for LTO so you are in safe hands
not that it always will, just this is the "standard" formula
far more people around to report bugs for "standard" installs
but that being said, doing weird stuff is fine, and it's really appreciated if you report the bugs
noice ๐
alright, i'll set it to build overnight
do the kernel first though
in the meanwhile i can't find a built binary for zen-kernel
i really don't want to build it
I don't think one exists
you could steal their config
note that you amy have issues with that, just build it and make food or something lol
can u confirm this is the proper way of rebuilding? emerge --emptytree @installed -a
emerge -e @world
^ that is what i used
you
wouldn't
steal
a kernel config
also you prob want the "buildpkg" feature added so itll make packags for that stuff
ez pez thank ๐
alright ๐
this is how i have it added
yea ๐
itll make a binpkg the first time i builds something
and that --usepkg thing will try to use that over building
thank yuo
yw, good luck with that stuff
it takes very little to build the full system tho, if i exclude llvm and firefox
im sure it's still not going to be a quick process
it won't ๐
because it's also reinstalling everything, lots of bits of overhead associated with totally rebuilding tour system
maybe an over nighter though
it will be yea
remaking the kernel is trivial compared to that
i'll set it up before going to sleep ๐ด
solid plan
i know but so far i have used the distribution kernel
even my 5950x takes a while
with a savedconfig
dayum
I do a lot of compiling so was worth the money
yeah i started rebuiulding my world a while back on my 7950x
i set those compiler flags a bit back and never rebuilt everything
lockfile errors because it's over a squashed nfs share lol
i still wish i could get this thing to load my cpu harder on most builds
so what conclusion did we come to ?
if you want my input I'd ask you for your CPU and compiler
build expectedly(?) failed overnight, with libxcb to be precise. if i disable lto for this package only can i resume the emerge with the new flags?
-O2 -pipe -march=native -flto
curious to see how much of a difference just adding LTO makes but GCC O3 is a bit too unstable that immolo would recommend it
gimme a couple more hours :)
O2 and O3 with gcc 12 and 13 are massively different, little reason to go O3 with gcc13 and also it's already enabled where it's needed (firefox)
well not massively, but one of them has function unroll
u shall have benchmarks once someone tells me this so i don't waste hours :o
cause i'm re-emerging everything and there is no way to keep track
number of first place finishes is meaningless, but mike does a weighted average which is abit more telling
you mean this?
My honest opinion is that people are too scared of O3 it can be enabled for a lot of packages
but
O2 is fine
anyway hope you see some nice benefits from enabling LTO
do you have the LTO and PGO use flags set globally?
yes
PGO made an insane difference in python for me
I know it's a bad benchmark but
dependency resolution for an empty auDU world took 11 seconds for me
after enabling LTO and PGO it was 7-8
and those were consistent it was always the same amount of seconds
yea what's up with portage being made in python ๐
it's easy to write in, someone decided it months ago
for me, as someone who develops a distro based on Gentoo
anyhow, this line tells me that:
The complete build log is located at '/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/temp/build.log'but if i go there it's just the same message
no contents inside that?
yea it's a bit slow, but it does dependency resolution in a couple seconds instead of instantly, not really a problem
pkgcore does it instantly
someday it will take over as the package manager for gentoo
sudo cat /var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/temp/build.log
* Package: dev-perl/IO-Socket-SSL-2.83.0:0
* Repository: gentoo
* Maintainer: [email protected]
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux
* FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
* Using ExtUtils::MakeMaker
* perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none DESTDIR=/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/image
API-different OpenSSL versions compiled in (0x30000090) vs linked (0x30100030) at Makefile.PL line 68.
* ERROR: dev-perl/IO-Socket-SSL-2.83.0::gentoo failed (configure phase):
* Unable to build!
*
* Call stack:
* ebuild.sh, line 136: Called src_configure
* environment, line 1762: Called perl-module_src_configure
* environment, line 1262: Called die
* The specific snippet of code:
* perl Makefile.PL "$@" <<< "${pm_echovar}" || die "Unable to build!";
*
* If you need support, post the output of `emerge --info '=dev-perl/IO-Socket-SSL-2.83.0::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-perl/IO-Socket-SSL-2.83.0::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/temp/environment'.
* Working directory: '/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/work/IO-Socket-SSL-2.083'
* S: '/var/tmp/portage/dev-perl/IO-Socket-SSL-2.83.0/work/IO-Socket-SSL-2.083'```
in that same dir?
it should link to one somewhere
also dont view this on phone because music but this could be the future of gentooo
it's very fast
and also python
ohhh
API-different OpenSSL versions compiled in (0x30000090) vs linked (0x30100030) at Makefile.PL line 68.
dayum
can you try to rebuild and update openssl and then rebuild perl
I know there was some way to
reset the emerge backlog
it keeps your last two emerges
but I forgot
if you just emerge --resume it should skip that package for a little bit
i'll look for it
i tried, it doesnt ๐
and deal with all the stuff that failed to build later
if you just wanna resume and ignore this package
let's just do
emerge --resume --skipfirst
and deal with it later
you should rebuild openssl and dev-perl over time
keep in mind that any package under dev-perl/* will inherit the same LDFLAGS and CFLAGS as dev-lang/perl and also linked dependencies
it's a pain
thank you, skipfirst seems to have worked
i just have to remember which packages did that
yes please keep a list
of packages that failed
I'll help you get them to build later
cpu?
Ryzen 7 5800X3D
dayum
it's taking a bit less on my side, but i've yet to build gcc this time
500 packages to go still
i know ๐ช
did it improve your benchmark scores at all
it skyrocketed firefox's
very nice
irqbalance didn't yield the desired effect 
what did you benchmark?
cpu performance with passmark, graphical performance with unigine superposition benchmark and glxgears (for rough reference, it has no value) and xonotic benchmark
isn't passmark a binary?
yes
i tried sysproffing it but it only calls the kernel and libc
unigine benchmark calls radeonsi_dri.so and glibc
maybe something is wrong with libc?
how can i see what functions are called from my system? i'm not interested in what the binary does because i can't build it myself, i want to see how it interacts with my system
sysprof is nice but i'm having a hard time understanding the output
@marsh shell sorry to ping you, do you know of a fast way to check which compilation flags are used in the ubuntu kernel package?
im not sure if that is something you can expect to obtain, maybe they have info on that, but im not entirely sure there is a straightforward way to look at something and be like "it was compiled with these specific options"
id like to be wrong tho, sounds cool
it's a deb package, the compilation options are there
i really believe deb packages keep track of that
since we're here, is there a fast way to enable lto on kernel too?
there's this, but involves patching... https://wiki.gentoo.org/wiki/Kernel/Optimization#GCC_LTO
oh interesting, I'm sure Debian has docs on this then right?
yea, i know i could look there, but everytime i tried i got lost, as debian packaging is a little hard
my question was only whether there was a blatantly obvious option that fedora/ubuntu/debian were using
maybe debian/rules in the package metadata
I'm sure debian will just use standard kflags
Honestly, do your benchmarks, gather data points, plot 'em, and make a Gentoo Forums post.
Pretty graphs will help
i will sometime thanks 
does everyone not use lto?
but yes I'm very very interested
i thought everyone used lto btw ._.
also to make changes apply do emerge -e @world
annd uhhh yeah try the exact same kernel
I actually don't, but I should.
I am a big LTO enjoyer
if I get around to it I will do some benchmark suite
with clang o2/o2 + lto/o3/o3 + lto
I guess now that I can build on a server I can also benchmark Os on my X220
and finally probe why I think more ppl should use it on lower spec hardware
some follow up to more findings in a bit