LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-17-2015, 09:21 PM   #1
slugman
Member
 
Registered: Jun 2010
Location: AZ
Distribution: Slackware
Posts: 106

Rep: Reputation: 1
Mozilla Firefox 35 w/ Profile Guided Optimization


Hey everyone,

when building the current version of Firefox-35 recently, I noticed in the SlackBuild the option to compile w/ PGO (Profile Guided Optimization).

This is basically a compiler feature which builds Firefox in two passes:
- a. builds instrumented binaries.
- b. re-builds optimized binaries based on profile information the compiler gathered from the optimized binaries.

The aim of building w/ PGO is to provide a performance gain. I was curious, so I decided to test if there was any measurable performance gain between the vanilla Firefox and a PGO-enabled build.

I utilized peacekeeper.futuremark.com's browser benchmark. The focus of peacekeepers benchmark is HTML5 functionality, but it does test functionality of the following: WebGL, javascript Document Object Model, Data manipulation, HTML5 video codecs, and more.

As prefaced in the SlackBuild comments, I wasn't expecting much of a performance gain, if any. However, the benchmark demonstrated the PGO-enabled Firefox build had a measurable performance increase.

Testing each build via the peacekeeper benchmark yielded the following results on my system:

- System Specs:
> HP G5 Proliant ML5
- Quad Core Xeon 5355 (2.66GHz)
- 8GB DDR 3 ECC ram
- 4x 3G 15k 73GB SAS drives in hardware Raid0
- HP Smart Array E200i

- Mozilla-Firefox-35.x86_64: 3521
- Mozilla-Firefox-35.x86_64.pgo-enabled: 3728

(Both links provide detailed analysis of the benchmark results.)

I found the results very interesting. Note, whereas compiling Firefox-35 took a solid hour, compiling the PGO-enabled build ran 4 hours straight (and occupied 8GB of diskspace too).

I've uploaded the PGO-enabled (and vanilla), Firefox-35 builds at my blog:

- http://slugman01.blogspot.com/2015/0...le-guided.html

I'm curious what anyone else would score on peacekeepers benchmark using both builds. Please try them and share your results!

I also have a favor to ask: right now I've uploaded the packages at datafilehost.com, however I would much rather prefer to upload these on a proper repository. Any suggestions would be greatly appreciated!

Diego
 
Old 01-18-2015, 01:53 AM   #2
JackHair
Member
 
Registered: Aug 2009
Location: Netherlands
Distribution: Slackware64-current
Posts: 167

Rep: Reputation: 38
I've tried nonpgo/pgo builds and I see an increase too.
nonpgo:4889
PGO :5141
Running An AMD FX-6350 @ 4.82 GHz - 8GB DDR3-1600

I already updated to Firefox 35 earlier and did a PGO build now to test this and I must say the speedup isn't really worth the extra build time. Without PGO Firefox builds in like 15-20 mins but with PGO it took nearly 1:30 hours! The RAM usage goes way up doing a PGO build. My 8GB RAM was full and an additional 3.7GB swap was used. Without PGO the browser does everything smoothly so it doesn't really feel better. Maybe on a slower computer it's more noticeable but I doubt it's really worth the extra build time. I don't think I'll build PGO again.
 
Old 01-18-2015, 02:09 AM   #3
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,440

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
The binaries that Mozilla offer are already PGO enabled,so you can just download and repack them and save yourself 4 hours.
 
Old 01-18-2015, 02:10 AM   #4
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,440

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Here is a script to repack the Mozilla binaries into Slackware packages: https://gist.github.com/ruario/9672798
 
Old 01-18-2015, 02:59 AM   #5
slugman
Member
 
Registered: Jun 2010
Location: AZ
Distribution: Slackware
Posts: 106

Original Poster
Rep: Reputation: 1
Ruario,

I am going to have to try that build script, thank you for providing the link.

Jackhair, I think I agree with you on this one, although the score is nice that is quite a bit of time to invest. Ruario this is where your script comes into play, if it saves time then we can have the benefit of a PGO-build w/o having to resort to investing the extra compile time!

I'm also quite jealous of your score Jackhair! Although you are on a six core proc; that is a pretty decent chip you have there.

Also, in looking at the detailed benchmark results, I noticed that there are some regressions in performance, namely the following areas:

Quote:
Mozilla-Firefox-35.x86_64 vs Mozilla-Firefox-35.x86_64.pgo-enabled

Data: 62791.08, 56951.34
arrayCombined 11528.00 ops, 8635.50 ops


DOM operations 17177.24, 17920.37
...
domJQueryBasicFilters 2153.35 ops, 2144.00 ops
...
domJQueryContentFilters 3588.00 ops, 3582.50 ops
...
domQueryselector 56430.00 ops, 51090.50 ops

In all honesty, I'm not sure whether a larger value necessarily indicates better performance for the given tests. I have to contact the site admin to doublecheck; the opposite may be true--smaller values may indicate faster/better performance.

In either case, when you think about how PGO is designed, you have to expect the possibility of regressions (which is true in any code modification):

From Wikipedia's Page on PGO:

Quote:
Rather than programmer-supplied frequency information, profile-guided optimisation uses the results of profiling test runs of the instrumented program to optimize the final generated code. The compiler is used to access data from a sample run of the program across a representative input set. The results indicate which areas of the program are executed more frequently, and which areas are executed less frequently. All optimizations benefit from profile-guided feedback because they are less reliant on heuristics when making compilation decisions. The caveat, however, is that the sample of data fed to the program during the profiling stage must be statistically representative of the typical usage scenarios; otherwise, profile-guided feedback has the potential to harm the overall performance of the final build instead of improving it.

Last edited by slugman; 01-18-2015 at 03:12 AM.
 
Old 01-18-2015, 05:55 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,809
Blog Entries: 58

Rep: Reputation: Disabled
Firefox 35.0, 64-bit obtained using ruario's script.
Score: 3906
i5-520M 2.4 GHz, 8 GB RAM
 
Old 01-18-2015, 06:53 AM   #7
Speek
Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Slackware
Posts: 124

Rep: Reputation: 41
Pentium E5300, 2.6 GHz dual-core, 4G RAM
Firefox 35.0, 64-bit, Mozilla binaries.
Peacekeeper score: 3433
 
Old 01-18-2015, 08:21 AM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,809
Blog Entries: 58

Rep: Reputation: Disabled
Post #6 was laptop result (Thinkpad 410).
Get a lot lower score on my desktop, again using ruario's script for FF 35, 64-bit:
score: 2465
AMD Athlon64 X2 5200+ 2.8 GHz, 8 GB RAM

Last edited by brianL; 01-18-2015 at 08:23 AM.
 
Old 01-18-2015, 09:31 AM   #9
JackHair
Member
 
Registered: Aug 2009
Location: Netherlands
Distribution: Slackware64-current
Posts: 167

Rep: Reputation: 38
@ slugman
Guess the script is the way to go indeed. To build it within reasonable time you need 12GB RAM at least. So it wont be a swap-fest!

High scores look nice in benchmarks but stuff like browsing the web isn't really an high performance area. The only thing that matters for real life application is that it runs smooth. I do have to OC the hell out of my CPU tho to reach this score (from 3.9GHz to 4.8GHz).

The scores you mentioned are in "ops" meaning "Operations Per Second", so yeah higher is better.
 
Old 01-18-2015, 09:36 AM   #10
GazL
Senior Member
 
Registered: May 2008
Posts: 4,952
Blog Entries: 15

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
Intel Core 2 E7400 @ 2.8Ghz, 4GB RAM, nvidia gt-140 gfx card using nouveau driver (not sure what impact that is going to have on the webGL stuff).

Firefox 31 ESR (as provided by Pat): 3048
Firefox 35 (mozilla built binary): 3844

edit: and just for kicks...
google-chrome (latest stable): 3418.

Last edited by GazL; 01-18-2015 at 09:44 AM.
 
Old 01-18-2015, 01:24 PM   #11
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
Firefox 35 official package from Slackware64-current on i5 4690S with NVIDIA GTX760, 8GB RAM scores 8289.
 
  


Reply

Tags
benchmark, compiler, firefox, mozilla, performance


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Profile-guided optimisation binaries for mariadb in slackware rpedrica Slackware 4 01-23-2014 11:00 AM
Building Firefox 3.6 - A "Profile Guided Optimization" (PGO) Automated Build Script GrapefruiTgirl Linux - Software 6 10-28-2010 09:50 AM
LXer: Mozilla Thunderbird to Find New Home as Mozilla Foundation Focuses on Mozilla Firefox LXer Syndicated Linux News 0 07-27-2007 09:16 AM
Mozilla - profile in use jrtayloriv Linux - Newbie 3 02-09-2005 01:03 AM
Create a profile in mozilla-firefox jpan Linux - Software 1 10-18-2004 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration