tar gzip slowing down server
Posted
by
Josir
on Server Fault
See other posts from Server Fault
or by Josir
Published on 2012-06-29T18:49:04Z
Indexed on
2012/06/29
21:18 UTC
Read the original article
Hit count: 148
I have a backup script that:
- compress some files
- generate md5
- copy the compressed file to another server.
- the other server finishes comparing MD5 (to find copy errors).
Here it's the core script:
nice -n 15 tar -czvf $BKP $PATH_BKP/*.* \
| xargs -I '{}' sh -c "test -f '{}' && md5sum '{}'" \
| tee $MD5
scp -l 80000 $BKP $SCP_BKP
scp $MD5 $SCP_BKP
This routine got CPU at 90% at gzip routine, slowing down the production server. I tried to add a nice -n 15
but server still hangs.
I've already read 1 but the conversation didn't help me.
What is the best approach to solve this issue ? I am open to new architectures/solutions :)
© Server Fault or respective owner