[TC 11.50 b1~b7 32-bit] Internal 7-Zip issue with the number of CPU threads.

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

[TC 11.50 b1~b7 32-bit] Internal 7-Zip issue with the number of CPU threads.

Post by *sky66 »

TC 11.50b1 ~ b7 32-bit with all default settings and no plugins, except for changing the Number of CPU threads from 2 to 8. At this point, Memory usage for compression shows 769MB.
Then, using TC internal 7-Zip to compress a file around 500-1000MB, an error message will appear:
"Error while compressing files: Not enough memory to complete this operation."

If using 7-Zip 24.08 32-bit with the default Number of CPU threads(8) to test compressing 500-1000MB, there are no issues.
Using TC 11.50 b7 32-bit with Total7zip plugin and the same Number of CPU threads(8) for testing compression of 500-1000MB also works .
Using TC 11.50 b7 64-bit with internal 7-Zip and the Number of CPU threads set to 32 (exceeding the CPU threads) to compress 500-1000MB also works without any issues.

My CPU has 16 threads. I tested this on a Win 10 PC and a laptop running Windows 11.
Both had 7-Zip 24.08 32-bit installed (7-Zip 64-bit version was uninstalled). The default Number of CPU threads = 8.
Normal compression/LZMA2/Dict:16MB/Word:32/Solid:4GB were kept at default values.
Also refer to 7-Zip 64-bit default Number of CPU threads = 16.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 b1~b7 32-bit] Internal 7-Zip issue with the number of CPU threads.

Post by *ghisler(Author) »

This is normal and can't be avoided: Total Commander doesn't just do 7-zip compression, and the memory can get fragmented quickly, so it can happen easily that you don't have a contiguous block of 769MB of RAM for the compression buffer. It has to be in one block, and 32-bit programs only have a memory map of 2 GB in user space to allocate memory from. If there are just 3 allocated blocks allocated at 500MB, 1000MB and 1500MB it's already impossible to allocate a block larger than 500MB. When you use external 7-zip EXE, it starts with its own 2 GB of user memory almost unused. Therefore it's much easier to allocate a memory block of 769MB.

Moderator message from: ghisler(Author) » 2024-11-21, 09:00 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply