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 normally use WinRAR over 7-Zip simply because it's faster and only a little less efficient with compression. I did a few tests on different filetypes and sizes comparing the 7-Zip and WinRAR default settings on their normal compression and their best compression, and in a lot of cases WinRAR was 50% faster and in some it was actually 100% faster. But, I do like FOSS more. So here are my questions:

  1. Is there a way to make 7-Zip speed up? I'd like it to at least be on par with WinRAR's speed
  2. Is there a way to make recovery segments in 7-Zip like you can in WinRAR? I didn't see any, but I guess it could be a command line thing.
  3. I tested WinRAR and 7-Zip using the latest stable version of each (4-dot-something with 7-Zip). Is the 9.x beta release noticeably faster at compression?

I'm talking about faster at a comparable setting in WinRAR, not just lowering to bare minimum compression.

If it matters, I use a quad core Intel i7 720 (1.6 GHz)/(2.8 GHz) with 4 GB DDR3 RAM, and the 64-bit version of 7-Zip, and dual-boot Debian x64 5.0.4 and Windows 7 Home.

share|improve this question
    
Regarding #2 -- 7-zip does not currently have any sort of "recovery record" or "ecc" ability. You'll need 3rd party software like QuickPar/MultiPar or ICE ECC, but then it's not part of the archive. –  afrazier May 25 '10 at 17:19

4 Answers 4

up vote 15 down vote accepted

If you get the 7-Zip 9.13 beta you can change the archive type to LZMA2 and thus be able to use as many threads as you like, though the memory usage goes up phenomenally.

Install the beta, right click the stuff you want to archive then under the 7-Zip contect menu click "Add to archive..." and you will get something similar to the window below. On the left hand side under Compression Method you should find "LZMA2" which will allow you to change the number of threads which will be an option a bit further down.

This has the potential of vastly increasing performance on >2 core processors as it can be better tuned to your system, and the normal compression method can only handle 2 threads maximum.

The "/1" you see to the right of the number of threads selection box in the image is the number of processors in your system and thus the recommended number of threads. My i7 is a quad core processor but has hyperthreading (which does actually help here btw) so it shows as "/8"

alt text

share|improve this answer
    
Anandtech.com has been using 7-Zip to help benchmark the performance improvements to be found in multi-core and multi-threaded CPU's, which otherwise is more theoretical in most of this generation's software. –  kmarsh May 25 '10 at 13:11
4  
What is the command line arg to enable LZMA2 ? –  djangofan Apr 4 '12 at 18:28
    
@Monkubai: IN the i7 4c-8t in my office, I can't get the 7-zip run full 8-core in LZMA2 mode whatever setting being set. Only method allow it runs all 8-threads is using BZip2 algorithms (from drop-down menu) which has lower compression ratio. –  Edward Nov 11 at 9:14
    
@Edward what version are you using? On 9.20 if I select lzma2 from that list I get the option to use up to 8 cores. –  Mokubai Nov 12 at 7:55
    
@Mokubai 9.20 official version. And there's nothing wrong with graphic UI, it still displays 8/8 cores parameter in setting panel but when processing it actually only use <20% cpu. I did a quick research in SU for the issue but haven't yet figured out the reason for that odd. Just know that if I use command line 7z with parameter such as -m0=lzma2 -mmt=8 then compression ultilizes ~100% CPU but once I switch to GUI, it returns to single-thread mode or something like that... which make use of CPU in a very inefficient way (<20%). –  Edward Nov 12 at 9:05

As each thread seems to compress multiple files at the same time, the best thing you can do to increase performance of very large zip jobs is to set threads to 1, to be sure that your hard drive will seek one file at a time.

We improve performance on all our daily zip-backup procedures by adding -mmt=off to 7-zip command line. Our backup of the "visual SVN repository", which is made from multiple small files, was taking between 50 and 60 minutes.

With -mmt=off, we now always do in in less than five minutes! And, during these 50 minutes, all our servers were very slow because of the hard drives seeking. Now, everything remains very fast during those five minutes.

For everything you do on a machine, the hard drive activity will always be slower than your CPU capacity. You can increase disk performance by disabling parallel activities and making sure that the hard drive reads (and write) your files one by one serially.

Also it's better to read from disk1 and write your ZIP to disk2, as the physical head does not move from read to write.

Sample line to get maximum ZIP speed while keeping your machine performance:

start "" /wait /belownormal c:\Progra~1\7-Zip\7z.exe a -tzip -mx=1 -mmt=off t:\backup.zip d:\folderToBackup\*

D: and T: are 2 different physical disks

share|improve this answer

My guess is that speeding up 7-Zip is impossible without re-writing its compression/de-compression algorithms, there may be some kind of tweak that increases speed but it will probably only be like a 10 or 15% increase, not a massive 50-100% increase that you're looking for.

share|improve this answer

All of the compression algorithms I've used recently (ZIP, RAR, 7z, tar/bzip2) are I/O bound, not CPU bound. Watching MenuMeters on my Mac laptop shows constant disk activity, but only 50% or less CPU activity.

Thus, the way to speed up compression/decompression is to speed up your disk. This isn't always possible.

My "solution" to this is to just do something else while I'm compressing something. :-)

share|improve this answer
2  
If disk I/O was Matt's problem, it would mean that WinRAR is somehow able to read from disk faster than 7Zip on his system... That sounds unlikely to me. –  foraidt May 27 '10 at 9:12
1  
It's possible that WinRAR uses smarter disk I/O; I know Info-ZIP's zip is hampered by its really small I/O buffers. But yeah, it could be a difference between the compression algorithms. –  chrish May 27 '10 at 17:22
    
7z is certainly not I/O-bound even in fast mode. –  Sarge Borsch 2 days ago

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.