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

zlib selection UI, compression levels, descriptions #145

Closed
ThomasWaldmann opened this issue Jan 20, 2019 · 10 comments
Closed

zlib selection UI, compression levels, descriptions #145

ThomasWaldmann opened this issue Jan 20, 2019 · 10 comments
Assignees
Labels
good first issue Simple change to start learning code base

Comments

@ThomasWaldmann
Copy link
Collaborator

ThomasWaldmann commented Jan 20, 2019

I just noticed that the UI for it is missing, it just offers all the others.

Also, I am not quite sure about the UI texts for the compression methods, my idea is rather:

  • lz4 (modern, super fast low compression)
  • zstd (modern, wide range from very fast to very high compression)
  • lzma (legacy, slower higher compression)
  • zlib (legacy, faster lower compression)
@ThomasWaldmann
Copy link
Collaborator Author

hmm, it doesn't let the user select the compression level.

@ThomasWaldmann ThomasWaldmann changed the title zlib compression? zlib selection UI, compression levels, descriptions Jan 20, 2019
@m3nu
Copy link
Contributor

m3nu commented Jan 20, 2019

To avoid having one more field, I just picked a few and set the compression level as well. Nobody complained so far. Of course there could also be a second dropdown to choose the level for each compression algo.

Suggestion to choose the compression algo:

        self.repoCompression.addItem(self.tr('LZ4 (modern, superfast low compression)'), 'lz4')
        self.repoCompression.addItem(self.tr('Zst (modern, fast medium compression)'), 'zstd')
        self.repoCompression.addItem(self.tr('LZMA (legacy, slower higher compression)'), 'lzma')
        self.repoCompression.addItem(self.tr('ZLib (legacy, faster lower compression)'), 'zlib')
        self.repoCompression.addItem(self.tr('No Compression (fastest)'), 'none')

I we want to add the compression level instead of providing 3-4 default settings of algo + level, I'd just mark it as "good first issue".

@ThomasWaldmann
Copy link
Collaborator Author

  • Zstd
  • do not advise (fastest) for no compression, it is often not true because lz4 saves more time than it needs (overall).
  • some well-picked algo+level sounds fine

@m3nu
Copy link
Contributor

m3nu commented Jan 20, 2019

some well-picked algo+level sounds fine

Then let's get to it. These are the available algos and standard levels:

  • Zstd (modern, fast medium compression): zstd,3
  • LZ4 (modern, superfast low compression): lz4
  • LZMA (legacy, slower higher compression): lzma,6
  • ZLib (legacy, faster lower compression): zlib,6
  • No Compression: none

First suggestion of combos:

  1. Highest compression, very slow: auto,lzma,6
  2. High compression, slow: auto,zstd,8
  3. Medium compression and speed (default): zstd,3
  4. Low compression, very fast: lz4

I looked roughly at those tests: https://community.centminmod.com/threads/compression-comparison-benchmarks-zstd-vs-brotli-vs-pigz-vs-bzip2-vs-xz-etc.12764/

Thinking:

  • LZMA has very good compression, but is very slow. So adding auto to make it bearable.
  • ZStd is fairly fast even at higher levels. Added auto again to skip e.g. images and videos.
  • Last 2 fast alround settings

@ThomasWaldmann
Copy link
Collaborator Author

reverse order from fast to slow. that also moves borg's default lz4 compression to top of the list.

@m3nu
Copy link
Contributor

m3nu commented Jan 20, 2019

OK. Then this wording and order, so users know the algo used.

  1. Low compression, very fast (LZ4): lz4 (selected by default)
  2. Low compression, fast (ZLib): zlib,6
  3. Medium compression and speed (ZStd): zstd,3
  4. High compression, slow (ZStd): auto,zstd,8
  5. Highest compression, very slow (LZMA): auto,lzma,6

@m3nu m3nu assigned m3nu and unassigned m3nu Jan 20, 2019
@m3nu m3nu added the good first issue Simple change to start learning code base label Jan 20, 2019
@ThomasWaldmann
Copy link
Collaborator Author

Some users may have started their repo with zlib, so this should be offered also.

Also noting that this is not a 1-dimensional thing, although a list might make it look like that.
speed, compression, algo type/age, ...

@m3nu
Copy link
Contributor

m3nu commented Jan 20, 2019

I know. One could write a master thesis about this topic. But many users will just want to pick something and forget about it.

(added ZLib above)

@fischer-felix
Copy link

Is there a way to specify a custom compression level for an algorithm (zstd in my case)?
I would like to compress more than just level 8, but afaik there is currently no way to set the level.

@real-yfprojects
Copy link
Collaborator

You can add the command line option -C of borg create in the LineEdit in the ScheduleTab to modify compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Simple change to start learning code base
Projects
None yet
Development

No branches or pull requests

4 participants