Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7z parameters for performance? #18

Closed
admaxey opened this issue Nov 15, 2019 · 5 comments
Closed

7z parameters for performance? #18

admaxey opened this issue Nov 15, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@admaxey
Copy link

admaxey commented Nov 15, 2019

Is there a way your script could pass parameters to 7-zip to increase performance? I have a Plex system with 28 cores, 384GB of RAM, and NVME SSD storage - a backup operation currently uses ~5% CPU and about 5GB of RAM and takes about 90 mins to complete. It appears that 7z has some switches for memory usage and multithreading. Have you considered allowing usage of these parameters?

https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm

@alekdavis
Copy link
Owner

I have, but I was afraid it would confuse most users. Which particular parameters would you want to be configurable?

@alekdavis alekdavis self-assigned this Nov 15, 2019
@alekdavis alekdavis added the enhancement New feature or request label Nov 15, 2019
@patrix87
Copy link

patrix87 commented Dec 8, 2019

Reducing the level of compression would greatly increase performance. Setting it to -mx1 would still reduce the fill size a lot but would make the backup take seconds instead of minutes.

@alekdavis
Copy link
Owner

@patrix87 : What about other flags (like the CPU utilization)? Wouldn't they need to be configurable as well?

@yangqi
Copy link

yangqi commented Feb 20, 2020

After reading the docs, 7z has multithreading 'on' by default. However, the LZMA2 algorithm it chooses only use 2 thread by default for following reason.

mt=[off | on | {N}]
Sets multithread mode. If you have a multiprocessor or multicore system, you can get a increase with this switch. 7-Zip supports multithread mode only for LZMA / LZMA2 compression and BZip2 compression / decompression. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads.

LZMA2 uses: 1 thread for each chunk in x1 and x3 modes; and 2 threads for each chunk in x5, x7 and x9 modes. If LZMA2 is set to use only such number of threads required for one chunk, it doesn't split stream to chunks. So you can get different compression ratio for different number of threads. You can get the best compression ratio, when you use 1 or 2 threads.

@alekdavis
Copy link
Owner

Implemented in v1.7.0. You can specify optional 7-zip switches for compression and decompression in the configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants