Bug 1307435 - Change compression level of symbols files; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Tue, 04 Oct 2016 06:16:29 -0700
changeset 426106 d498de8b00d1bc96c6d471ba1bbf1eaf689a347e
parent 426105 a5ef6698d92c756d86a47d7546e1310fa82862a7
child 534101 08ecba8599cc7f5cf8dbfc8e454cc07a54d333b3
push id32626
push userbmo:gps@mozilla.com
push dateMon, 17 Oct 2016 22:09:34 +0000
reviewersted
bugs1307435
milestone52.0a1
Bug 1307435 - Change compression level of symbols files; r?ted Currently, we use the gzip default of 6. Our history with zlib tells us that reducing the compression level to 5 or 4 often yields significantly faster operations while only sacrificing a little storage. Measurement here shows similar results. On libxul.so.dbg: level time compressed 6 21.0s 231,045,158 5 15.8s 232,926,435 4 12.2s 237,587,011 3 11.1s 245,104,157 Changing the level from 6 to 4 increases the size of the compressed file by 6,541,853 bytes, or 2.83%. But it saves ~10s from the long pole of builds in automation. And that's just from libxul. When you factor in all compressed files, this change has a significant impact on symbol generation. Before: 221s wall; 150s CPU; 311,424,856 bytes After: 192s wall; 130s CPU; 318,085,885 bytes That's on my machine, which has a 4.0 GHz CPU. CPU time savings in automation will likely be more significant. MozReview-Commit-ID: 7CbRSZvUayj
toolkit/crashreporter/tools/symbolstore.py
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -869,17 +869,17 @@ class Dumper_Linux(Dumper):
            subprocess.call([self.objcopy, '--add-gnu-debuglink=%s' % file_dbg, file]) == 0:
             rel_path = os.path.join(debug_file,
                                     guid,
                                     debug_file + ".dbg")
             full_path = os.path.normpath(os.path.join(self.symbol_path,
                                                       rel_path))
             shutil.move(file_dbg, full_path)
             # gzip the shipped debug files
-            os.system("gzip -f %s" % full_path)
+            os.system("gzip -4 -f %s" % full_path)
             self.output(sys.stdout, rel_path + ".gz")
         else:
             if os.path.isfile(file_dbg):
                 os.unlink(file_dbg)
 
 class Dumper_Solaris(Dumper):
     def RunFileCommand(self, file):
         """Utility function, returns the output of file(1)"""