UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2010-02-04 12:10 PM

santtarius
Guest

Re: Unix uncompress taking long time.

Hi,



  I am restoring the database backup using compress utility(/usr/bin/compress) which takes around 1 hour.For restoration i use uncompress utility(/usr/bin/uncompress) which is taking nearly 6-7 hours.Can someone let me know how to reduce this time.I have pasted below the line from script which is used for uncompressing data :



for File in ${acFileList}

do

Uncompress=/usr/bin/uncompress
($Uncompress -cf $File 2>/dev/null > $acRestoreDir/${File%.Z} ; echo $?
$File >> $errorfile ) &

done



Regards

Santhosh Kumar N

#2 2010-02-04 02:42 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: Unix uncompress taking long time.

Why in the world are you using such an ancient and obsolete compression method?
At least use gzip, which has been around for ages, and is far better than old compress...
But, there's also bzip2, which is often even better...  (At least if your goal is smaller
file size...  I think it is often slower to compress than gzip, so if speed is your goal,
probably stick with gzip, and maybe even lower the compression level to "-1"...)

I've never seen either gzip or bzip2 take longer to UNcompress something than it
does to compress it in the first place, though...  That's just nuts...  Decompression
is usually pretty instant, and the only slowness is due to hard disk speed in doing
the necessary writes...

Offline

Board footer

Powered by FluxBB