


Everything is different, Manjaro is more bleeding edge.eccerr0r wrote:What version of GCC?
Are you glibc heavy, are they using the same versions of glibc?
What other compiler options are you using?
What background tasks/window manager/desktop environments are being run?
Kernel compiled the same way for both setups? Same kernel version?

Code: Select all
emerge -1vp stockfish
I see. I'd rather stick with the default stable gentoo though, even though some programs have a slightly lower performance.John R. Graham wrote:Gentoo can be more bleeding edge if you want it to be. If you keyword gcc, you'll get up to version 4.9.2 (as of this writing). Gentoo Unstable is pretty stable in my experience. The gcc 5.x series is hard masked in Gentoo, though, which usually means something is critically broken. (In this case, it's a feature: an ABI change.) Also, you may not have taken advantage of all of the available optimizations. What doesshow you?Code: Select all
emerge -1vp stockfish
- John
Code: Select all
[ebuild R ~] games-board/stockfish-6-r1::gentoo USE="optimize (-armv7) -debug -general-32 -general-64" CPU_FLAGS_X86="popcnt sse -avx2" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Yeah I had done so but honestly I didn't bother to check out all the differences. In fact I did it to see if I could got rid of a spam of USB related messages in dmesg in gentoo while I didn't get those spams in Manjaro. (I fixed that problem).ct85711 wrote:If you want, you can see what kernel configurations Manjaro used, by making a copy of the /proc/config.gz. That has the running kernel's configuration gzipped.
Note: I just checked on my copy of Manjaro to make sure that file was available.



Code: Select all
#gcc-4.9
#CFLAGS_GCC_BASE="-march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64
--param l2-cache-size=3072 -mtune=ivybridge"
#gcc-4.8
#CFLAGS_GCC_BASE="-march=core-avx-i -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=3
2 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core-avx-i"Code: Select all
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
steveL wrote:Show us the emerge --info please (in a code tag or a pastebin.)
Code: Select all
~ $ sudo emerge --info
Password:
Portage 2.2.18 (python 2.7.9-final-0, default/linux/amd64/13.0/systemd, gcc-4.8.4, glibc-2.20-r2, 3.18.12-gentoo x86_64)
=================================================================
System uname: Linux-3.18.12-gentoo-x86_64-Intel-R-_Core-TM-_i3-3217U_CPU_@_1.80GHz-with-gentoo-2.2
KiB Mem: 3935096 total, 3198616 free
KiB Swap: 4097020 total, 4097020 free
Timestamp of repository gentoo: Mon, 15 Jun 2015 12:30:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash: 4.3_p33-r2::gentoo
dev-java/java-config: 2.2.0::gentoo
dev-lang/perl: 5.20.2::gentoo
dev-lang/python: 2.7.9-r1::gentoo, 3.3.5-r1::gentoo
dev-util/cmake: 3.2.2::gentoo
dev-util/pkgconfig: 0.28-r2::gentoo
sys-apps/baselayout: 2.2::gentoo
sys-apps/openrc: 0.16.4::gentoo
sys-apps/sandbox: 2.6-r1::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils: 2.24-r3::gentoo
sys-devel/gcc: 4.8.4::gentoo
sys-devel/gcc-config: 1.7.3::gentoo
sys-devel/libtool: 2.4.6::gentoo
sys-devel/make: 4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc: 2.20-r2::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gudev iconv ipv6 mmx mmxext modules multilib ncurses nls nptl openmp pam pcre qt4 qt5 readline session sse sse2 ssl systemd tcpd udev unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHONI've just enabled BFS and rebuilt the kernel. It gives almost exactly the same performance, I can't notice any difference even after benchmarking. So I still haven't found out why Manjaro runs Stockfish 2 to 4% faster than my gentoo...As far as I remember manjaro uses BFS and BFQ in its default kernel as well.


Yes it's possible but I've just learned that it uses "BFQ" which is available in the AUR but apparently not enabled in the default gentoo kernel configuration. I guess it would be possible to add it although I wouldn't know how, and I don't know whether this is responsible for the speed difference.CaptainBlood wrote:Seems like you're focusing on kernel issue.
I didn't read all your env, but isn't possible to copy Manjaro kernel and dependancies to gentoo for a cross-distro boot?
I guess not ...
Maybe someone else knows.
Isnt .config somehow available @ Manjaro for an import to gentoo?
Thks 4 ur attention, interest & support.
Code: Select all
FFLAGS="$CFLAGS"
FCFLAGS="$FFLAGS"Code: Select all
# default: -Wl,-O1 -Wl,--as-needed
LDFLAGS="$LDFLAGS -Wl,--sort-common -Wl,--hash-style=gnu -Wl,-z,relro -Wl,-z,now -Wl,-z,combreloc"
I doubt it would make much difference but BFQ comes with their kernel built in, there's nothing that involves AUR. Gentoo-sources comes with BFQ if you use the 'experimental' flag, then you just need to enable it in the kernel config.linux_dream wrote:Yes it's possible but I've just learned that it uses "BFQ" which is available in the AUR but apparently not enabled in the default gentoo kernel configuration. I guess it would be possible to add it although I wouldn't know how, and I don't know whether this is responsible for the speed difference.CaptainBlood wrote:Seems like you're focusing on kernel issue.
I didn't read all your env, but isn't possible to copy Manjaro kernel and dependancies to gentoo for a cross-distro boot?
I guess not ...
Maybe someone else knows.
Isnt .config somehow available @ Manjaro for an import to gentoo?
Thks 4 ur attention, interest & support.
Meanwhile I've tweaked some parameters in the kernel, retried benchmarks but I get no difference whatsoever.


Because he imported the same binary he was running under Manjaro and saw approximately the same 2% difference, which implicates the kernel.CaptainBlood wrote:Sorry to ask why stockfish compiling env seems discarded, as it almost seems only kernel is focused on?



Code: Select all
g++ -march=native -O2 -pipe -Wall -Wcast-qual -fno-exceptions -fno-rtti -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -mpopcnt -DUSE_POPCNT -flto -Wall -Wcast-qual -fno-exceptions -fno-rtti -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o benchmark.o benchmark.cppCode: Select all
ldd /usr/bin/stockfish
linux-vdso.so.1 (0x00007ffcaede7000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff4e2893000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff4e2678000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libstdc++.so.6 (0x00007ff4e2364000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff4e2061000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff4e2c30000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff4e1e4a000)
Despite out of topics, could you plz explain 'static busybox part' from a general perspective, or a crystal clear link maybe ...NeddySeagoon wrote: ....I don'f feel like experimenting much further as -flto that doesn't work on those libraries will need my static busybox to fix.

Code: Select all
busybox shCode: Select all
$ lddtree /bin/busybox
/bin/busybox (interpreter => None)Code: Select all
$ eix busybox
[I] sys-apps/busybox
Available versions: 1.20.2^t 1.21.0^t{tbz2} (~)1.21.1^t{tbz2} (~)1.22.0^t (~)1.22.1^t{tbz2} (~)1.22.1-r1^t{tbz2} 1.23.0-r1^t{tbz2} 1.23.1^t 1.23.1-r1^t{tbz2} (~)1.23.2^t{tbz2} **9999^t {debug ipv6 livecd make-symlinks math mdev -pam savedconfig selinux sep-usr +static syslog systemd}
Installed versions: 1.23.2^t{tbz2}(21:05:08 06/03/15)(ipv6 pam static -debug -livecd -make-symlinks -math -mdev -savedconfig -selinux -sep-usr -syslog -systemd)
Homepage: http://www.busybox.net/
Description: Utilities for rescue and embedded system
Isn't that going to cause problems?NeddySeagoon wrote:Code: Select all
...-O2 ... -O3
