LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-16-2010, 11:11 AM   #1
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Rep: Reputation: 30
Comparing experience: xz and gzip


I've been testing xz compression because I've read many anecdotal reports of improved compression over gzip. I'm careful to maintain complete data backup for all my user data and have, at this time of writing, a 29 Gig. data-set.

I have the following results:

gzip -9 on a 29 gig. .tar file results in a .tar.gz 31% - 32% smaller than the original .tar file.

xz -9 on a 29 gig. .tar file results in a .tar.xz 36% - 38% smaller than the original .tar file.

My 29 gig. data-set contains 717,000 files of widely varying sizes.
All data is stored on ext4 filesystems using kernel 2.6.29.6.

The surprising discovery was the time it took to complete the job using xz. Gzip consistently finished in just under 1 hour -- approx. 59 minutes; however, xz required 4hr38min. - 4hr42min. to complete the same.

For me, the 5%-6% increased compression is definitely not worth the additional 3.5 hr. - 3.75 hr. process time to completion.

I'm interested to hear others' results.
 
Old 08-16-2010, 07:48 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
just for comparison what dose bz2 & tar.bz2 show for file size and times ?
 
Old 08-17-2010, 11:39 AM   #3
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by John VV View Post
just for comparison what dose bz2 & tar.bz2 show for file size and times ?
test process commenced; will report back upon completion.
 
Old 08-17-2010, 01:26 PM   #4
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Original Poster
Rep: Reputation: 30
# time bzip2 -9 -v test.tar
test.tar:

1.496:1, 5.348 bits/byte, 33.15% saved, 29319710720 in, 19598812379 out.

real 124m28.091s
user 120m23.832s
sys 0m37.292s

- - - - - - - - -

Very odd, bzip2 takes twice the time as gzip and only produces a 1.15% compression increase over gzip. Also, xz requires more than twice the time of bzip2 and only produces a 3%-5% compression increase over bzip2.

I don't know if there is anything unusual about my data files skewing the results in favor of gzip.

For my needs and environment, xz and bzip2 provide no compelling benefit. I'll continue to use gzip -9.
 
Old 08-17-2010, 03:36 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
not to odd bz2 normally dose take longer but the compression is normally better
but not on photos , except for RAW files .

p7z ( the fileroller plugin)_ for 7-zip is normally fairly fast -- but i don't use it to much
my MS only friends just say " wtf- windows can not open it" ( default windows )
and are clueless as how to install 7-zip - and it is FREE
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open gzip file? I have gzip installed mhg Linux - Newbie 3 10-24-2008 02:18 AM
gzip help mahmoud Linux - Newbie 7 05-16-2008 07:53 AM
[gzip] appears in process table after gzip command completes redmanDBA Linux - General 0 02-26-2008 06:12 AM
apt-get update error: "gzip: stdin: not in gzip format" haertig Debian 0 08-02-2006 05:21 PM
Solaris 8 gzip issues- cannot gzip -d lynx sixosix Solaris / OpenSolaris 4 03-13-2005 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration