#52 parallel gzip support

closed
nobody
None
5
2011-11-21
2011-11-20
No

For dumping my (very) large databases, I could massively improve compression speed by using parallel gzip (pigz). Because pigz is a drop-in replacement for gzip for modern multi-processor and multi-core environments, so it uses the same command line argument. So I suggest this realy tiny change to the compression() funtion which then allows an additional compression method COMP='pigz' instead of COMP='gzip' or COMP='bzip2':
Maybe the delevoper also consider to do something more automatic (for examples if gzip is choosed, multiple cores and pigz are present on the system)

# Compression function plus latest copy
SUFFIX=""
compression () {
if [ "$COMP" = "gzip" ] || [ "$COMP" = "pigz" ]; then
$COMP -f "$1"
echo
echo Backup Information for "$1"
$COMP -l "$1.gz"
SUFFIX=".gz"
elif [ "$COMP" = "bzip2" ]; then
echo Compression information for "$1.bz2"
bzip2 -f -v $1 2>&1
SUFFIX=".bz2"
else
echo "No compression option set, check advanced settings"
fi
if [ "$LATEST" = "yes" ]; then
cp $1$SUFFIX "$BACKUPDIR/latest/"
fi
return 0
}

Discussion

  • PittaGurneyi

    PittaGurneyi - 2011-11-21

    Accepted. However I have only made changes to the 3.x version and it will be part of 3.0_rc2.

     
  • PittaGurneyi

    PittaGurneyi - 2011-11-21
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks