Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

firefox vs firefox-bin binary sizes

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

firefox vs firefox-bin binary sizes

  • Quote

Post by eccerr0r » Tue Aug 08, 2017 6:59 pm

I suspect I have "USE flag differences" between what Mozilla.org and what I used, but I was kind of shocked at the huge file size differences:

-rwxr-xr-x 1 root root 68583952 Jun 7 15:33 /opt/firefox/libxul.so
-rwxr-xr-x 1 root root 92910164 Aug 1 22:21 /usr/lib/firefox/libxul.so

-rwxr-xr-x 1 root root 167188 Jun 7 15:33 /opt/firefox/firefox-bin
-rwxr-xr-x 1 root root 399324 Aug 1 22:21 /usr/lib/firefox/firefox-bin

Both are stripped. Same version of firefox-52.2;
USE flags: (omitting all -l10n_* flags)
-bindist -custom-cflags -custom-optimization +dbus -debug +gmp-autoupdate -gtk2 -hardened -hwaccel -jack +jemalloc -pulseaudio +startup-notification -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi

This machine is an old Pentium-M and I don't feel much difference between the two binaries after loading (at least it seems on my Atom the self-built binary seems faster than firefox-bin) but the file size differences seems astronomical. Anyone find some USE flags that could cause this much bloat difference?

The Atom I have an SSD. This old Pentium-M has a mechanical HDD. Not sure which CPU should be faster (1.6GHz dual thread Atom vs 1.6GHz Pentium-M) but the mechanical HDD makes it feel really slow...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue Aug 08, 2017 7:30 pm

The difference probably comes from official builds using pgo. You're not going to have much luck building with that on an Atom...
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Aug 08, 2017 7:48 pm

I don't think either of the Atom or the Pentium-M will have much luck building with PGO despite the Atom having 2GB RAM (and the poor Pentium-M having only 1GB.)

I'm surprised PGO would have that much improvement in binary sizes?

---

Oh wait: GET THIS:

-rwxr-xr-x 1 root root 294080 Jul 3 16:17 /usr/lib/firefox/firefox-bin
-rwxr-xr-x 1 root root 78983088 Jul 3 16:17 /usr/lib/firefox/libxul.so

This was built on my i7 with USE (again omitting -l10n*):
-bindist -custom-cflags -custom-optimization +dbus -debug +gmp-autoupdate -gtk2 -hardened -hwaccel -jack +jemalloc -pgo +pulseaudio +startup-notification -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi

Now why my Pentium-M build would be so large?

And why does my i7 show the pgo use flag but not the Pentium-M... Both have X installed...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue Aug 08, 2017 8:30 pm

Looks like pgo is use.masked on x86. Makes sense, since building Firefox has had OOM problems in the past with only 4GB to work with.

I wonder if -march=native causes GCC to act stupid with inlining... I've seen it go insane with reasonable-looking -m switches on other packages.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Aug 08, 2017 8:41 pm

My i7 has nothing special, CFLAGS="-O2 -pipe".
My Pentium-M CFLAGS="-O2 -mtune=pentium3 -pipe"

I'm pretty sure I have -march=atom on my atom because I wanted to make sure it uses atom specific instructions if it makes it faster, the atom is slow enough as it is. Then again this Pentium-M is also pretty bad nowadays.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue Aug 08, 2017 9:36 pm

I wonder if there's any obvious pattern besides x86/amd64... this is on my Phenom II, pretty similar to that i7:

Code: Select all

-rwxr-xr-x 1 root root   297168 Jul 16 03:16 /usr/lib/firefox/firefox-bin
-rwxr-xr-x 1 root root 74523376 Jul 16 03:16 /usr/lib/firefox/libxul.so
My make.conf isn't unreasonable, just -march=native (spelled out for distcc) and some hardened ldflags:

Code: Select all

CFLAGS="-O2 -pipe -march=amdfam10 -mtune=amdfam10 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,combreloc,-z,relro,-z,now"
emerge --info firefox seems to have "enhanced" things quite a bit though, maybe that's a clue?

Code: Select all

www-client/firefox-54.0.1::gentoo was built with the following:
USE="hwaccel jemalloc pulseaudio system-harfbuzz system-icu system-jpeg system-libevent system-libvpx -bindist -custom-cflags -custom-optimization -dbus -debug -gmp-autoupdate -hardened -jack (-neon) -nsplugin -pgo (-selinux) -startup-notification (-system-cairo) -system-sqlite -test -wifi" ABI_X86="(64)" L10N="en-GB -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu
-fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-pipe -pipe -march=amdfam10 -mtune=amdfam10"
CXXFLAGS="-pipe -pipe -march=amdfam10 -mtune=amdfam10 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,combreloc,-z,relro,-z,now -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
(I would've posted numbers for my Atom here too, but I uninstalled firefox after unstable versions started taking over 24h to compile with distcc)
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Aug 08, 2017 11:08 pm

Oh, also forgot that each of the machines do have CPU_FLAGS_X86 to their appropriate values.

This is on a Core2 (64-bit) machine:
$ ls -l /usr/lib/firefox/firefox-bin /usr/lib/firefox/libxul.so
-rwxr-xr-x 1 root root 294016 Jul 26 22:59 /usr/lib/firefox/firefox-bin
-rwxr-xr-x 1 root root 78954232 Jul 26 22:59 /usr/lib/firefox/libxul.so

So something very strange is going on the Pentium-M.

I have another Pentium-M (32-bit) class machine that also has the bloat:

-rwxr-xr-x 1 root root 395196 Jul 7 19:22 /usr/lib/firefox/firefox-bin
-rwxr-xr-x 1 root root 90293620 Jul 7 19:22 /usr/lib/firefox/libxul.so

It too has a similar -mtune=pentium-m ... I suspect this may be the smoking gun. I might have to fire up a VM or simply recompile my i7's firefox with -mtune=pentium-m (as it should run pentium-m binaries fine as well as being able to compile firefox in a reasonable amount of time) and see what it will do...

EDIT:

I think perhaps it's i686 generating large binaries?!?!? I just found my Atom (32-bit) also has huge binaries:

-rwxr-xr-x 1 root root 391132 Jun 25 01:13 /usr/lib/firefox/firefox-bin
-rwxr-xr-x 1 root root 92952564 Jun 25 01:13 /usr/lib/firefox/libxul.so

One thought that 64-bit would have bigger binaries, but now the reverse is true???!

EDIT 2:

My 32-bit virtual machine box is now updated to 52.2 and:
-rwxr-xr-x 1 root root 399324 Aug 9 02:46 /usr/lib/firefox/firefox-bin*
-rwxr-xr-x 1 root root 92910164 Aug 9 02:46 /usr/lib/firefox/libxul.so*

Bloaty 32 bit?
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy