[root@server2 vagrant]# time mysqldump --compress myportal | gzip > test.gz
real 0m14.675s
user 0m7.426s
sys 0m0.618s
[root@server2 vagrant]# time mysqldump myportal | gzip > test.gz
real 0m9.455s
user 0m6.343s
sys 0m0.646s
[root@server2 vagrant]# time mysqldump --compress myportal | gzip > test-compress-gzip.gz
real 0m14.603s
user 0m7.371s
sys 0m0.580s
[root@server2 vagrant]# time mysqldump myportal | gzip > test--gzip.gz
real 0m9.357s
user 0m6.314s
sys 0m0.668s
[root@server2 vagrant]# time mysqldump myportal | bzip2 > test--bzip.bz2
real 1m10.520s
user 1m7.152s
sys 0m0.739s
[root@server2 vagrant]# time mysqldump --compress myportal | bzip2 > test-compress-bzip.bz2
real 1m15.358s
user 1m7.156s
sys 0m0.773s
[root@server2 vagrant]# du -h test-*
6.7M test--bzip.bz2
13M test--gzip.gz
6.7M test-compress-bzip.bz2
13M test-compress-gzip.gz
[root@server2 vagrant]# du test-*
6808 test--bzip.bz2
12376 test--gzip.gz
6808 test-compress-bzip.bz2
12376 test-compress-gzip.gz
bzip2 compress more than gzip but the process time is longer than gzip.
So please choose between speed and compression ratio, which suite ur needs.