Open matangpanchal opened 2 years ago
I have the same question :)
In testing the newer versions of 7zip default to all CPU threads.
The custom parameter is set differently for multi threading. It uses mt
with the thread count. I give it about 80% of the CPU.
var processorCount = (int)(Environment.ProcessorCount * .8);
compressor.CustomParameters.Add("mt", processorCount.ToString());
Hi. Is there a way to see how much of the processors is in use by the compression? It will be best to see a realtime usage of the processors with some events or something! If mt is passed to library, how can we see each thread what is doing? Because I'm thinking that when we call the compression method with this custom parameter 7z library is creating some multi-threading processes. So, if you have multiple files for archiving each thread will compress a file? I don't understand how it is working...
How can I use multi threading functionality to compress files. On your first page you have mentioned customparameters with the refrence of 7zip.chm file, but in my current version I can't any switch to use, and in the 7z.exe help there is a switch "-mmt" which i tried with your library then some "value out of acceptable range exception" is happening. kindly let me know the workaround , otherwise unfortunately I will have to find any other solutions to compress my file only due to slow performance. because with the current implementation library takes 20 to 30 sec to compress files which from the 7zip UI i am able to compress in 10 to 15 seconds Regards, Matang