
TAR COMPRESS MULTITHREAD INSTALL
It makes use of multiple processors to speed up its operation and in general works considerably faster than bzip2. What is tar and How Do I Install it As per the tar manual (which you can access by typing man tar once it is installed), tar is an archiving utility.
TAR COMPRESS MULTITHREAD HOW TO
I suspect that the something's wrong when the TarInfo object is passed into the other process but the parent TarFile is not, but I'm not sure how to fix it in the multiprocess case. Lbzip2 is a multithreaded utility for handling ‘bzip2’ compression, written by Laszlo Ersek. After having read the manpage for tar I was able to make tar output to stdout by running it along with the -O argument, but I wasnt able to find out how to make it input from stdin.
TAR COMPRESS MULTITHREAD ARCHIVE
Tar.addfile(info, StringIO.StringIO(contents))įiles = I need to use tar in a pipeline inside a shell script to archive and compress some files. The actual program is more complicated, but this is an example of what I'm doing that reproduces the error: from multiprocessing.pool import ThreadPool, Pool BZ2File are not thread-safe, so if you need to use a single LZMAFile instance from multiple threads, it is necessary to protect it with a lock. Return self.map_async(func, iterable, chunksize).get()įile "/ldata/whitcomb/epd-7.1-2-rh5-x86_64/lib/python2.7/multiprocessing/pool.py", line 522, in get I'm getting an error that I suspect is related to processes not sharing address space, but I'm not sure how to fix it: Traceback (most recent call last):įile "test_tarfile.py", line 24, in test_multiprocįile "/ldata/whitcomb/epd-7.1-2-rh5-x86_64/lib/python2.7/multiprocessing/pool.py", line 225, in map
I'm able to successfully use the ThreadPool implementation within the multiprocessing module, but would like to be able to use processes instead of threads as it would possibly be faster and eliminate some changes made for Matplotlib to handle the multithreaded environment. 13 Answers Sorted by: 155 You can pipe tar across an ssh session: tar czf -Once the archive needs to be extracted again, it is easy to do so provided the correct decompression software is available on the computer used to decompress or extract.

Memory requirements of some of the future multithreaded modes may be dramatically. Compressing files can help you save a lot of room on your storage devices, and knowing how to use tar in combination with available compression options will help you to do so. I'm trying to process the contents of a tarfile using multiprocessing.Pool. 0 is sometimes faster than gzip -9 while compressing much better. It gives you the ability to use any compression utility that supports the -d option.
