pharmacyvef.blogg.se

Tar compress bz2
Tar compress bz2















For gzip and xz -6 as a default compression method provides a good level of compression yet does not take too long to complete, it’s a fair trade off point as higher compression levels take longer to process.

tar compress bz2

The reason for this is pretty clear based on the results. Gzip vs Bzip2 vs XZ Decompression Speed Performance Differences and Comparisonīy default when the compression level is not specified, gzip uses -6, bzip2 uses -9 and xz uses -6. The table below indicates the size in bytes of the linux-3.18.19.tar file after compression, the first column numbered 1.9 shows the compression level passed in to the compression tool.įirst we’ll start with the compression time, this graph shows how long it took for the compression to complete at each compression level 1 through to 9. The raw data that the below graphs have been created from has been provided in tables below and can also be accessed in this spreadsheet. The versions pf these tools were gzip 1.5, bzip2 1.0.6, and xz (XZ Utils) 5.1.2alpha. To decompress, the same command was used with the -d flag. To save and reduce CPU processing time a lower compression level can be used which will result in a lower compression ratio, using more disk space.Įach time the compression or decompression command was run, the ‘time’ command was placed in front so that we could accurately measure how long the command took to execute.īelow are the commands that were run for compression level 1:Īll commands were run with the time command, verbosity and the compression level of -1 which was stepped through incrementally up to -9. To get a higher compression ratio and save a greater amount of disk space, more CPU processing time will be required. There is an important trade off here between the compression levels between CPU processing time and the compression ratio. Compression level 9 on the other hand is the best possible compression level, however it will take the longest amount of time to complete. A compression level of 1 indicates that the compression will be fastest but the compression ratio will not be as high so the file size will be larger. The linux-3.18.19.tar file was compressed and decompressed 9 times each by gzip, bzip2 and xz at each available compression level from 1 to 9. This file was 580,761,600 Bytes in size prior to compression. With XZ it is possible to specify the amount of threads to run which can greatly increase performance, for further information see example 9 here.Īll tests were performed on linux-3.18.19.tar, a copy of the Linux kernel from.

tar compress bz2

The server had 4 CPU cores and 16GB of available memory, during the tests only one CPU core was used as all of these tools run single threaded by default, while testing this CPU core would be fully utilized. The test server was running CentOS with kernel 3.10.0-229.11.1 in use, all updates to date are fully applied.

#Tar compress bz2 how to

Gzip, Bzip2 and XZ are all popular compression tools used in UNIX based operating systems, but which should you use? Here we are going to benchmark and compare them against each other to get an idea of the trade off between the level of compression and time taken to achieve it.įor further information on how to use gzip, bzip2 or xz see our guides below:















Tar compress bz2