7z 9.20 does not appear to use all threads when executed as scheduled task
A free file archiver for extremely high compression
Brought to you by:
ipavlov
Running 7z in a powershell script that is part of a scheduled task. Version 9.20 x64. Server is Windows Server 2012 x64, 32GB of ram, two quad core hyperthreading processors (16 cores)
Command is: 7z a ../archive_name.7z -m0=lzma2 -mx1 -mmt=16
When run through the powershell IDE, and when run as a standalone .ps1 script, the process runs with full processor utilization and finishes in approximately 2 hours. When allowed to run as scheduled task, only uses between 1-3% of processor and I've never seen it finish.
Any ideas on this?
Maybe there is some quote for CPU threads for scheduled tasks?
Try some benchmark commands:
Benchmarks are all very similar. All speeds are within negligible run-to-run variations. Here is the one generated from the scheduled task.
RAM size: 2047 MB, # CPU hardware threads: 16
RAM usage: 1738 MB, # Benchmark threads: 16
Dict Compressing | Decompressing
Speed Usage R/U Rating | Speed Usage R/U Rating
KB/s % MIPS MIPS | KB/s % MIPS MIPS
22: 26969 1180 2223 26235 | 305568 1375 2003 27553
23: 27998 1213 2352 28526 | 287095 1305 2011 26259
24: 26647 1232 2325 28651 | 255205 1171 2022 23671
Avr: 1208 2300 27804 1284 2012 25828
Tot: 1246 2156 26816
Last edit: Bill Meaney 2015-11-19
How many files do you compress?
And what total size.
You can try some additional things:
1) Use latest 7-Zip 15.12 x64.
2) Try to reduce the number of files and track "Reading IO Bytes" in Task Manager. There is new
-btswitch that can show some statistics, if archive creation will be finished.There are many files we compress in this directory....a couple hundred
thousand files ranging from kilobytes to gigabytes in size.
On Fri, Nov 20, 2015 at 12:45 AM, Igor Pavlov ipavlov@users.sf.net wrote:
Related
Bugs: #1580
This was an issue within Windows itself.
For anyone else experiencing this issue, you need to export the scheduled task, manually edit the Priority (usually set at 7, Below Normal) to a more reasonable priority like 4 or 5, and reimport the task.
This is perhaps worth including in the documentation...although any Windows Server admins should know enough to look this up.
Take Care,
Bill Meaney