diff options
author | Bryan Quigley <bryan.quigley@canonical.com> | 2018-05-22 11:26:27 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-07 16:02:51 +0100 |
commit | f1f3a63aada7e5559f25c918fb8bb45c9ecdff7a (patch) | |
tree | 3cc40b017a5a8659cb1bfc1a4b7c99adce89dac4 | |
parent | 5f2e731f5d034c9d67ac8273dc0e4810f7cda289 (diff) | |
download | sos-f1f3a63aada7e5559f25c918fb8bb45c9ecdff7a.tar.gz |
[archive] switch compression preset from -1 to -2
I've noted an uptick of users recompressing sosreports to get a
better compression rate for uploading over slow links. My tests
indicate that -2 is a better default and should remove any benefit
of compressing again.
In tested cases -2 does not cause any significant CPU increase
and always has shown an improvment - sometimes substancial. The
worst was 3seconds more for a 15MB savings. I would generally
expect to see similar percentage savings as sosreports get bigger.
-3 and higher were evaluated but had diminshing returns that
didn't seem worth it.
Tests results:
NVMe drive
xz -a --batch
-1 5.9M 30.766s
-2 5.7M 30.673s
-3 5.6M 30.101s
-4 5.5M 35.882s
bz2
bz2 -a --batch
-1 11M 36.675s
-2 8.3M 38.792s
xz -a --all-logs --batch
-1 87M 1m8.994s
-2 72M 1m11.926s
-3 69M 1m18.210s
-4 70M 2m33.930s
Old hard drive
-a --batch
-1 5.3M 14.935s
-2 5.2M 15.611s
-a --batch --all-logs
-1 35M 38.881s
-2 26M 38.337s
Resolves: #1307
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/archive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/archive.py b/sos/archive.py index 931554d1..58545dab 100644 --- a/sos/archive.py +++ b/sos/archive.py @@ -444,7 +444,7 @@ class TarFileArchive(FileCacheArchive): suffix = "." + cmd.replace('ip', '') # use fast compression if using xz or bz2 if cmd != "gzip": - cmd = "%s -1" % cmd + cmd = "%s -2" % cmd try: exec_cmd = "%s %s" % (cmd, self.name()) r = sos_get_command_output(exec_cmd, stderr=True, timeout=0) |