Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to extract a huge .tar.gz file but when I do extract it stalls the server. The server is write heavy and extracting seems to choke the disk. Is there a nice way to extract without stopping the world? I've tried the 'nice' and 'cpulimit' command but they don't seem to do the trick.

share|improve this question
Run du -h on the file - what is it's size? – new123456 Jul 8 '11 at 12:47
up vote 2 down vote accepted

Where are you bottlenecking: IO or CPU?

Have you tried ionice yet? -c3 (idle only) or -n7 (lowest priority) should do the job.

Are you trying to retrieve a single file out of it, or just unpacking the full thing?

share|improve this answer
Unpacking full thing. It's a lot of files. – ForeverConfused Jul 8 '11 at 13:55
If you got a lot of RAM you're not using, you can try to unpack it there first. But if the tarball is really huge, that's not gonna fit. So I guess we're back to the basics of 'what is your bottleneck?' when you run top, are your gunzip/tar programs in R or D state? What do vmstat, iostat -x, iotop say? – Marcin Jul 8 '11 at 13:58

Apply ionice to the unzip process. It may significantly slow your unzip, but you should be able to eliminate the stalling of other programs.

You may want to install atsar and look at your disk IO load. If you have multiple disks, you may want to look at moving partitions to balance the load.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .