Kbuild: use normal compression settings for tar*-pkg
PATCH 1/1 Kbuild: use normal compression settings for tar*-pkg
From: Andi Kleen <[email protected]>
For large kernel configurations (like a distribution kernel) targz-pkg takes a quite long time to just do the compression. I clocked it at 15+mins for a SUSE kernel like config on a fast system. And tarxz and bzip2 are even slower.
The main reason is that the script that is doing the taring sets the highest compression level (-9). When I change it to just use the defaults the gzip time for the same kernel goes down to ~3 mins. I haven't tested xz and bzip, but I expect those to be much faster too.
I'm not willing to wait that long for a small compression gain. So just change the script to use the defaults.
--- scripts/package/buildtar | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/package/buildtar +3 -3
@@ -28,15 +28,15 @@ case "${1}" in file_ext="" ;; targz-pkg) - compress="gzip -c9" + compress="gzip" file_ext=".gz" ;; tarbz2-pkg) - compress="bzip2 -c9" + compress="bzip2" file_ext=".bz2" ;; tarxz-pkg) - compress="xz -c9" + compress="xz" file_ext=".xz" ;; *)
Signature · 1 line
1.7.7.6
Quoted 7 lines · Andi Kleen
From: Andi Kleen <[email protected]>
For large kernel configurations (like a distribution kernel) targz-pkg takes a quite long time to just do the compression. I clocked it at 15+mins for a SUSE kernel like config on a fast system. And tarxz and bzip2 are even slower.
Quoted 8 lines
The main reason is that the script that is doing the taring sets the highest compression level (-9). When I change it to just use the defaults the gzip time for the same kernel goes down to ~3 mins. I haven't tested xz and bzip, but I expect those to be much faster too.
I'm not willing to wait that long for a small compression gain. So just change the script to use the defaults.
Makes sense to me.
Quoted 10 lines
Signed-off-by Andi Kleen <[email protected]>--- scripts/package/buildtar | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)scripts/package/buildtar +0
-0
scripts/package/buildtar case "${1}" in · line 31
Quoted 5 lines
scripts/package/buildtar +1
-1@@ -28,15 +28,15 @@ case "${1}" in file_ext="" ;; targz-pkg) - compress="gzip -c9" + compress="gzip"
-c should be kept because it means --stdout and --keep
scripts/package/buildtar case "${1}" in · line 35
Quoted 5 lines
scripts/package/buildtar +1
-1file_ext=".gz" ;; tarbz2-pkg) - compress="bzip2 -c9" + compress="bzip2"
ditto
scripts/package/buildtar case "${1}" in · line 39
Quoted 5 lines
scripts/package/buildtar +1
-1file_ext=".bz2" ;; tarxz-pkg) - compress="xz -c9" + compress="xz"
ditto
Quoted 11 lines
scripts/package/buildtar +0
-0file_ext=".xz" ;; *)Signature · 7 lines
1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines
-c should be kept because it means --stdout and --keep
It seems to work without it.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Quoted 4 lines · Andi Kleen
Quoted 2 lines
-c should be kept because it means --stdout and --keep
It seems to work without it.
Yeah I see: it's used in the pipe anyway:
tar cf - . $opts | ${compress} > "${tarball}${file_ext}"Thanks,
Fengguang
Quoted 14 lines · Fengguang Wu
Quoted 13 lines · Andi Kleen
From: Andi Kleen <[email protected]>
For large kernel configurations (like a distribution kernel) targz-pkg takes a quite long time to just do the compression. I clocked it at 15+mins for a SUSE kernel like config on a fast system. And tarxz and bzip2 are even slower.
The main reason is that the script that is doing the taring sets the highest compression level (-9). When I change it to just use the defaults the gzip time for the same kernel goes down to ~3 mins. I haven't tested xz and bzip, but I expect those to be much faster too.
Quoted 6 lines
Quoted 2 lines
I'm not willing to wait that long for a small compression gain. So just change the script to use the defaults.
Makes sense to me.
Reviewed-by Fengguang Wu <[email protected]>
Applied to kbuild.git#kbuild.
Michal
Quoted 34 lines · Andi Kleen
From: Andi Kleen <[email protected]>
For large kernel configurations (like a distribution kernel) targz-pkg takes a quite long time to just do the compression. I clocked it at 15+mins for a SUSE kernel like config on a fast system. And tarxz and bzip2 are even slower.
The main reason is that the script that is doing the taring sets the highest compression level (-9). When I change it to just use the defaults the gzip time for the same kernel goes down to ~3 mins. I haven't tested xz and bzip, but I expect those to be much faster too.
I'm not willing to wait that long for a small compression gain. So just change the script to use the defaults.
Signed-off-by Andi Kleen <[email protected]>--- scripts/package/buildtar | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)scripts/package/buildtar +1
-1@@ -28,15 +28,15 @@ case "${1}" in file_ext="" ;; targz-pkg) - compress="gzip -c9" + compress="gzip" file_ext=".gz" ;; tarbz2-pkg)
scripts/package/buildtar case "${1}" in · line 42
Quoted 10 lines
scripts/package/buildtar +2
-2- compress="bzip2 -c9" + compress="bzip2" file_ext=".bz2" ;; tarxz-pkg) - compress="xz -c9" + compress="xz" file_ext=".xz" ;; *)
Maybe add new default compression options or rename actual ones to -hc- (high compression) if users dont like it much?
Z.
Quoted 2 lines
Maybe add new default compression options or rename actual ones to -hc- (high compression) if users dont like it much?
Doesn't sound useful to me. The normal ones are good enough.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.