Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.