EsoErik

Sunday, November 25, 2012

 

Using p7zip in Multithreaded Mode to Make a .tar.xz from a Tar Stream Sent Across the Network

My laptop's CPU is slow compared to my Linux workstation's.  I store my backups on my workstation's array, so in the past, I streamed uncompressed tar output through netcat to my workstation, where I piped it through xz and into a .tar.xz file.

Doing a little research, I found that p7zip supports multithreaded xz compatible LZMA2 compression.  With a little experimenting, p7zip worked as a drop-in replacement for xz.

Command executed on the laptop: tar cvp --one-file-system --exclude=/.SWAP /efi / | netcat 192.168.0.115 61710

Command executed on the workstation:  netcat -l -p 61710 | 7z a -mmt=4 -si tektite.tar.xz.  htop running on the workstation shows that all four cores are utilized:

The resulting .tar.xz file is successfully extracted by tar -xJvf tektite.tar.xz.

Labels: , ,


Comments:

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   September 2010   December 2010   January 2011   February 2011   April 2011   June 2011   August 2011   February 2012   June 2012   July 2012   August 2012   October 2012   November 2012   January 2014   April 2014   June 2014   August 2014   September 2014   October 2014   January 2015   March 2015   April 2015   June 2015   November 2015   December 2015   January 2016   June 2016   August 2016   January 2017   March 2017  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]