mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-02 12:31:12 +02:00
chore: use parallel xz with higher compression level
Preset `-0` for xz means fast compression but low compression level. Changing this to `-6` (default) means that result is 10% smaller (tested with RPi4 image). Enable parallel compression with number of threads equal to number of CPUs to make it compress even faster then with `-0`: * `-0`: 15s * `-6`: 60s * `-6 -T 0`: 10s (on my machine, depends on number of cores) Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
parent
571f7db1bb
commit
6d6ed1170f
@ -186,7 +186,7 @@ func tar(filename, src, dir string) error {
|
||||
}
|
||||
|
||||
func xz(filename string) error {
|
||||
if _, err := cmd.Run("xz", "-0", filename); err != nil {
|
||||
if _, err := cmd.Run("xz", "-6", "-T", "0", filename); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user