Subject: Re: Getting tar to play nice
From: Charles Lepple (firstname.lastname@example.org)
Date: Thu May 31 2001 - 13:13:15 MDT
--On Thursday, May 31, 2001 11:35 AM -0500 Gawain Reifsnyder
> I'm backing up a bunch of large files on a running server using tar
> with the -z flag to gzip the archive, and using nice to lower the
> nice -n 10 tar -czvf honkingbackup.tar.gz file1 file2...
> The priority of the tar process is lowered, but the gzip process
> appears to proceed at full steam, hogging the cpu.
Unfortunately, just because two processes are nice'd does not mean that
they will both respond the same to their lower priority. I forget exactly
what goes on in the kernel scheduler, but whenever disk accesses are
involved, the effect of nice levels is not as obvious as when you lower the
priority of a CPU-bound app like, say, SETI@home (and since the gzip
process is doing both disk accesses and computations, it throws another
wrench in the works).
The gzip process, being fork'd by the tar process, should have the same
nice value. You can renice the gzip process even more, but it may not be
enough to "get it out of the way" of the other processes on that box.
-- Charles Lepple <email@example.com> http://ghz.cc/charles/
This archive was generated by hypermail 2a24 : Thu May 31 2001 - 12:19:19 MDT