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.

How do I enable multi-threaded LZMA2 using 7-zip 9.20 on the command line? I know this is normally done with the -t option like so: "-tzip" .

How do I do this with LZMA2? I tried -tlzma and -tlzma2 and neither one works. I also tried not passing -t at all, and it just runs single threaded with "lzma" mode.

Here is the command I currently have, but it is slow, and single threaded:

"C:\Program Files\7-Zip\7z.exe" a -r -tzip -y XMLBackup.zip *.xml
share|improve this question

3 Answers 3

Try -m0=lzma2

"C:\Program Files\7-Zip\7z.exe" a -m0=lzma2 -r -y XMLBackup.zip *.xml

more info

share|improve this answer
4  
This combined with -mmt=x did the trick for me. It seems that if lzma2 is not specified that it uses the older lzma compression and therefore can't use multiple threads. If you specify both options, it will be able to use multithreading. –  Kibbee Oct 25 '12 at 15:24

The help file says it's mt=number_of_threads

I know this is specifically about the command line, but one thing I can say about when using the GUI, as soon as you switch to LMZA2 you got all the options. And it DOES speed up compression a great deal, utilizing the full 100% of your CPU's power rather than the usual 25%.

share|improve this answer

The multithreading mode is given in a -m flag, and it's apparently only implemented for zip, 7z, bzip2 and xz. More specifically, -mmt=<<# of threads>>. However, according to the documentation, it is enabled by default. See the CHM manual included with 7-zip for more information.

share|improve this answer
    
I tried it and didn't notice any apparent speed increase. I am not entirely convinced it works. –  djangofan Apr 4 '12 at 20:30
    
How many physical cores is windows seeing in your computer? You can tell whether multithreading is being used by CPU usage; it's possible that you're already seeing the best speed and turning multithreading off just makes it even slower. –  Kovensky Apr 4 '12 at 23:12
    
I already thought of that. I opened 7-zip (version 9.20) and I looked at what it "detected" as the number of cores. That is the number I used. –  djangofan Apr 6 '12 at 2:25

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.