LinuxQuestions.org
Review your favorite Linux distribution.
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 12-12-2008, 03:08 AM   #1
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
Question TAR - compresing using 4 cores


Hi everyone,

is there any body here which can tell me how can I setup TAR to use all processor cores during zip process ?

All the time is working only one. On the server is fast RAID and it looks like the processor making bottle neck effect for compress.



dlugasx
 
Old 12-12-2008, 03:26 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Tar can not work in parallel on multiple cores, but there are two compression utilities which provide this functionality: pbzip2 and mgzip. They are compatible with their "serial" counterparts, for decompression. So you can create a normal archive and then compress it using one of these utilities. Here is an example of performance on a machine with 2 XEON QUAD CORE CPUs (8 cores):
Code:
$ time pbzip2 file.nc

real    0m19.708s
user    2m31.685s
sys     0m1.399s
$
$ time bzip2 file.nc

real    1m57.925s
user    1m56.934s
sys     0m0.762s
 
Old 12-12-2008, 03:33 AM   #3
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
Talking

Quote:
Originally Posted by colucix View Post
Tar can not work in parallel on multiple cores, but there are two compression utilities which provide this functionality: pbzip2 and mgzip. They are compatible with their "serial" counterparts, for decompression. So you can create a normal archive and then compress it using one of these utilities. Here is an example of performance on a machine with 2 XEON QUAD CORE CPUs (8 cores):
Code:
$ time pbzip2 file.nc

real    0m19.708s
user    2m31.685s
sys     0m1.399s
$
$ time bzip2 file.nc

real    1m57.925s
user    1m56.934s
sys     0m0.762s



nice Trick

I tested this and its working realy fast . I must implement this with pipe to the backup scripts.

BIG BEER for Colucix

tahnks man
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
cores vs. clockspeed jhwilliams Linux - Hardware 26 10-21-2007 09:35 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Cores on Fedora jonty_11 Fedora 2 11-05-2004 09:25 AM

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

All times are GMT -5. The time now is 01:20 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