allow jobSize to be as low as 512 KB #2611
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
answer #2043 .
previous lower limit was 1 MB.
Note : by default, the smallest job size, achieved at level 1, is 2 MB.
So this PR has no impact on multi-threading compression at default settings.
Smaller job sizes can be achieved by manipulating job sizes directly,
or by manually modifying window sizes to lower amounts.
#2043 requested to make the minimum modifiable at runtime,
but it doesn't make sense, since
jobSize
itself is a runtime parameter.If there is a lower limit, that's because we believe there are side effects introduced when job sizes are too small, and they should be avoided. The value of the lower limit can be negotiated, but its existence should not.
Minimum job size can still be modified at compile time, setting build variable
ZSTDMT_JOBSIZE_MIN
.This makes it practical for tests, in trying to assess what's a better minimum on a specific system.
Also : updated unit test to ensure that this new limit works fine
(test would fail with previous 1 MB limit).