{"id":26,"date":"2011-09-29T17:20:11","date_gmt":"2011-09-29T17:20:11","guid":{"rendered":"http:\/\/blog.mozilla.org\/nfroyd\/?p=26"},"modified":"2011-09-29T18:47:52","modified_gmt":"2011-09-29T18:47:52","slug":"pgo-startup-times-with-syzygy","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nfroyd\/2011\/09\/29\/pgo-startup-times-with-syzygy\/","title":{"rendered":"pgo startup times with syzygy"},"content":{"rendered":"<p>In an effort to confirm that we do want all this syzygy goodness in our release builds, I&#8217;ve been testing out syzygy on PGO builds (since we do PGO builds on Windows for releases). After removing the PEBKAC and getting a proper PGO build&#8211;which took depressingly long&#8211;I have mixed results.<\/p>\n<p>First, the good news. On my laptop (Win7, Core i7, SSD), the <tt>about:startup<\/tt> numbers look like this:<\/p>\n<table cellspacing=\"10\" cellpadding=\"5\">\n<tbody>\n<tr>\n<th>Version<\/th>\n<th>main<\/th>\n<th>sessionRestored<\/th>\n<th>firstPaint<\/th>\n<\/tr>\n<tr>\n<td>Base PGO build<\/td>\n<td>265<\/td>\n<td>3152<\/td>\n<td>3012<\/td>\n<\/tr>\n<tr>\n<td>Optimized PGO build<\/td>\n<td>234<\/td>\n<td>2778<\/td>\n<td>2653<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These numbers are really encouraging; they&#8217;re actually even better than <a title=\"startup reduction times with syzygy\" href=\"http:\/\/blog.mozilla.org\/nfroyd\/2011\/09\/19\/startup-reduction-times-with-syzygy\/\">the initial numbers I posted earlier<\/a>.\u00a0 (Though I note that they are universally slower than the earlier numbers&#8230;hm&#8230;.)<\/p>\n<p>There is one curious thing about these builds, though. When you look at the page fault numbers, they suggest a much different story. The (cold) numbers are what you get from starting Firefox just after a reboot; the (warm) numbers are from a second startup after the first.<\/p>\n<table cellspacing=\"10\" cellpadding=\"10\">\n<tbody>\n<tr>\n<th>Version<\/th>\n<th>Hard faults (cold)<\/th>\n<th>Soft faults (cold)<\/th>\n<th>Hard faults (warm)<\/th>\n<th>Soft faults (warm)<\/th>\n<\/tr>\n<tr>\n<td>Base PGO build<\/td>\n<td>2507<\/td>\n<td>41219<\/td>\n<td>8<\/td>\n<td>26100<\/td>\n<\/tr>\n<tr>\n<td>Optimized PGO build<\/td>\n<td>2264<\/td>\n<td>41488<\/td>\n<td>14<\/td>\n<td>23017<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These numbers are totally contrary to what <a title=\"fewer page faults with syzygy\" href=\"http:\/\/blog.mozilla.org\/nfroyd\/2011\/09\/08\/fewer-page-faults-with-syzygy\/\">I saw with non-PGO builds<\/a>. We&#8217;re not consistently lower in the optimized build on either measure. I honestly haven&#8217;t thought very hard about what this means yet.<\/p>\n<p>Anyway, that&#8217;s the good news. The bad news is that on my desktop (Win XP, Core 2 Quad, mechanical drive), the <tt>about:startup<\/tt> numbers look like this:<\/p>\n<table cellspacing=\"10\" cellpadding=\"5\">\n<tbody>\n<tr>\n<th>Version<\/th>\n<th>main<\/th>\n<th>sessionRestored<\/th>\n<th>firstPaint<\/th>\n<\/tr>\n<tr>\n<td>Base PGO build<\/td>\n<td>1516<\/td>\n<td>8984<\/td>\n<td>8813<\/td>\n<\/tr>\n<tr>\n<td>Optimized PGO build<\/td>\n<td>1437<\/td>\n<td>9187<\/td>\n<td>8828<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>(I don&#8217;t have the necessary profiling tools on my XP box for doing page fault analysis. I shouldn&#8217;t think they&#8217;d differ dramatically between the two systems, though.)<\/p>\n<p>This is a little discouraging. The syzygy-optimized build is a little faster off the line, but gets edged out by the base build in getting to the points that actually matter. I haven&#8217;t thought terribly hard about these numbers, either. One possibility is that I did turn off the XPCOM glue preloading bits, which IIUC correctly are helpful for encouraging XP to keep its hands off your binary&#8217;s startup time. Doing that was necessary for getting postlinking to work properly. If I made that runtime-configurable, then I could run tests with the preloading enabled and see if we win there.<\/p>\n<p>Bottom line: We would win on leading-edge machines, but we wouldn&#8217;t see a lot of benefit on older machines.<\/p>\n<p>Also, if Microsoft would add a <tt>drop_caches<\/tt> lookalike, that would be <em>fantastic<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an effort to confirm that we do want all this syzygy goodness in our release builds, I&#8217;ve been testing out syzygy on PGO builds (since we do PGO builds on Windows for releases). After removing the PEBKAC and getting a proper PGO build&#8211;which took depressingly long&#8211;I have mixed results. First, the good news. On [&hellip;]<\/p>\n","protected":false},"author":320,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts\/26"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/users\/320"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nfroyd\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}