7-Zip解压许多小文件速度慢

huangapple go评论64阅读模式
英文:

7-Zip Decompress of Many Small Files Slow

问题

We're distributing software which involves decompressing an archive of almost a million small (approx 1K) files on Windows (typically Windows 11). I've noticed that although some of the more exotic implementations of 7-Zip (e.g. Lizard/LZ5 compression) do an admirable job of compressing up the files (approx 2 min) into an archive, the corresponding decompress takes about six times as long, and appears to be independent of the actual compression method used. Also, at no point does either the disk or the CPU come close to full utilization (30% of each is typical).

I've tried disabling Windows Defender, any other running programs, and Task Manager isn't showing anything interesting going on. Is this underwhelming performance simply a factor of file creation in Windows 11? Anything else I can check?

Thanks!
-Pete

英文:

We're distributing software which involves decompressing an archive of almost a million small (approx 1K) files on Windows (typically Windows 11). I've noticed that although some of the more exotic implementations of 7-Zip (e.g. Lizard/LZ5 compression) do an admirable job of compressing up the files (approx 2 min) into an archive, the corresponding decompress takes about six times as long, and appears to be independent of the actual compression method used. Also, at no point does either the disk or the CPU come close to full utilization (30% of each is typical).

I've tried disabling Windows Defender, any other running programs, and Task Manager isn't showing anything interesting going on. Is this underwhelming performance simply a factor of file creation in Windows 11? Anything else I can check?

Thanks!
-Pete

答案1

得分: 1

问题原来并不是7-zip,而是(很可能是)Windows 11上的Windows Defender。

尝试将大文件拆分为较小的存档,并启动多个7-zip实例来解压缩它们,导致相同的解压缩时间,以及磁盘/CPU的类似低利用率。更显著的是,CPU使用的大部分被AntimalwareExecutable(也称为Windows Defender)占用。

在Windows 11中,至少在使用Microsoft帐户登录时,似乎不可能完全禁用Microsoft Defender(其主动保护显示为Antimalwareexecutable进程,但还涉及其他安全措施)。即使你尽力关闭篡改保护、关闭实时保护,并启用组策略以关闭Windows Defender... 当你重新启动时,你会发现组策略已被覆盖以撤销你的更改。安装第三方防病毒解决方案,然后禁用它,可能允许你在没有Windows Defender的情况下运行,但我没有测试这一点。

最终,我尝试了一个测试,强制进入带命令提示符的安全模式。启动单个7-zip实例来解压缩文件,完成速度超过12倍。从中我得出结论,问题很可能是Windows Defender或相关的服务级别进程。如果有人有更深入的见解,我会非常感激。

英文:

It turns out the problem was not really 7-zip, but (likely) Windows Defender on Windows 11.

Attempting to split the large file into smaller archives and firing off multiple instances of 7-zip to decompress them led to identical decompress time, and a similar underutilization of the Disk/CPU. What did become more noticeable was that the majority of what CPU was used was taken by AntimalwareExecutable (aka Windows Defender)

In Windows 11, at least when signed in with a Microsoft Account, it seems apparently impossible to fully disable Microsoft Defender (whose active protection shows up as the process Antimalwareexecutable when scanning, but also involves other security measures). Even when you go so far as to turn off Tamper Protection, Turn off Real-time Protection, and enable the group policy to turn off Windows Defender... when you reboot, you'll discover that the group policy has been overridden to undo your change. It's possible that installing a 3rd party AV solution, then disabling it, will allow you to run without Windows Defender, but Ï did not test that.

Ultimately, I tried a test by forcing a boot into safe mode with command prompt. Firing off a single instance of 7-zip to decompress the files completed over 12X faster. From this, I conclude the problem is (likely) Windows Defender, or a related service-level process. If anyone has further insight, I'd certainly appreciate it.

huangapple
  • 本文由 发表于 2023年5月21日 02:03:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76296673.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定