speed up built in ZIP packer

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

gonzo55
Junior Member
Junior Member
Posts: 9
Joined: 2020-02-20, 00:02 UTC

Re: speed up built in ZIP packer

Post by *gonzo55 »

Absolutely superb ability to set up 7-Zip as a .zip packer, amazing speed, 100% CPU utilisation!🎉👍

A couple of notes about the zip packer setup section:
-for some reason, it is possible to enable the checkboxes for both the internal packer and the 7-Zip one, maybe its a bug?🐛
-and 7z is the format, the packer is called 7-Zip, I think this is better to understand
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: speed up built in ZIP packer

Post by *ghisler(Author) »

Which parameters did you use for 100% CPU? Here it only uses 16-17%.
And it's considerably slower than the new internal libdeflate packer!
Author of Total Commander
https://www.ghisler.com
gonzo55
Junior Member
Junior Member
Posts: 9
Joined: 2020-02-20, 00:02 UTC

Re: speed up built in ZIP packer

Post by *gonzo55 »

You're right! 100% CPU only when packing small files, I tested 10-20mb *.jpg
I tried 900-1000mb database and the compression was single threaded, my joy was short-lived😭😭
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: speed up built in ZIP packer

Post by *ghisler(Author) »

Did you compare it with the new internal packer too?
Author of Total Commander
https://www.ghisler.com
gonzo55
Junior Member
Junior Member
Posts: 9
Joined: 2020-02-20, 00:02 UTC

Re: speed up built in ZIP packer

Post by *gonzo55 »

The speed depends on the compressible content, I checked in two variants:

15 x 591mb virtual machine snapshot, total uncompressed size 8,66gb
4:35 7-zip and windows compressed folder showed the same speed
1:28 inernal (level 6, verify off) and winrar (normal, CPU 35%) also showed the same speed

370 x .jpg ~15mb, total uncompressed size 4,32gb
00:59 internal (level 6, verify off)
00:53 winrar (normal, CPU 35%)
00:11 7-zip (cpu 100%)
2:53 windows compressed folder

Tried to find the file size when 7-zip shows maximum speed. In my case, 100% CPU load with the 7-zip packer is achieved for 15 x 236mb files, but when compressing 15 x 283mb files, the load drops to 10%, with regular short peaks up to 35%. As a result, if the files are small (each 236mb or less in my case), then it is better to compress with 7-zip, and if large, then the use built-in.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: speed up built in ZIP packer

Post by *ghisler(Author) »

It sounds like 7zip is packing multiple files in parallel, which makes sense because ZIP packing cannot be parallelized within a file.
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: speed up built in ZIP packer

Post by *Usher »

2ghisler(Author)
Do you mean packers or formats? 7-zip packer can use multithreading mode for both 7z and zip formats.
Andrzej P. Wozniak
Polish subforum moderator
gonzo55
Junior Member
Junior Member
Posts: 9
Joined: 2020-02-20, 00:02 UTC

Re: speed up built in ZIP packer

Post by *gonzo55 »

Аbout zip format, 7-Zip supports multithreding only with zip-bzip2, with default zip-deflate it can be multithreaded only with non large files.
I just checked the zip-bzip2 archive in windows 11 explorer and it unzipped successfully, but I think when I checked it before in an earlier version of the OS 7 or 10, it would not open. The zip-deflate format seems to be more compatible. But maybe I'm wrong and zip-bzip2 opens everywhere now.

Can someone tell me where and what parameter should be added to make it zip-bzip2 compressed when using 7-zip as external packer for zip?
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1015
Joined: 2004-07-29, 11:00 UTC

Re: speed up built in ZIP packer

Post by *ZoSTeR »

gonzo55 wrote: 2023-07-01, 15:47 UTCCan someone tell me where and what parameter should be added to make it zip-bzip2 compressed when using 7-zip as external packer for zip?
The parameter is "-m0=BZip2"
so "Zip Packer:" says

Code: Select all

<Path-to>\7zG.exe -m0=BZip2
Windows 10 (22H2) does not support this.
You can see the file list but "Method" says "Unknown"

Don't know what the latest Win11 version supports, but the next big update is supposed to come with 7z and Rar extraction.
Which methods will be supported remains to be seen...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: speed up built in ZIP packer

Post by *Horst.Epp »

This configuration entry works fine for me
"C:\Program Files\7-Zip\7zg.exe" -mcu=on -m0=BZip2
It generates the format BZIP2+Store
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Post Reply