Sunday, August 30, 2020

mysqldump comparison using compress option with bzip2 and gzip performance and the output size

[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.

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...