19
4
(I posted this first on serverfault, but then I realized it probably belongs here.)
I'm trying compress a very large text file using 7za (p7zip) 9.20. The -mmt option doesn't seem to have any effect. I've tried both -mmt=on and -mmt=2. This is an 8-core machine. One person suggested adding -m0=lzma2 as an argument, but that just gives me E_INVALIDARG. Does anybody know how to make this work?
This has no effect:
7za a -mx=9 -mmt=2 -p myarchive.zip bigfile.txt
And this fails with an error:
7za a -m0=lzma2 -mx=9 -mmt=2 -p myarchive.zip bigfile.txt
7-Zip (A) [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)
Scanning
Creating archive release_20120601-1-http.zip
System error:
E_INVALIDARG
I believe the option is simply
-mmt
, not-mmt=2
. Also I believe the proper syntax is-mx9
, although both might work. – Breakthrough – 2012-06-07T17:20:20.837Thanks, but -mmt without an option still uses only one thread. According to http://docs.bugaco.com/7zip/MANUAL/switches/method.htm#ZipMultiThread, you can specify the number of threads to use with, -mmt=N.
– Brian L – 2012-06-07T17:30:02.890I would still recommend using LZMA/Deflate even though it's only single threaded. While you might get an increased compression speed with BZip2, it's less efficient when compressing plain text, and the single-threaded variants are slower than the LZMA/Deflate equivalents.
– Breakthrough – 2012-06-07T18:09:11.473@Breakthrough: BZip2 usually achieves better compression than DEFLATE, as shown in your link. It's also much, much faster than LZMA (when compressing). – Dennis – 2012-06-07T18:17:43.530