Merge pull request #2355 from senhuang42/change_ldm_mt_config
Reduce --long mode MT jobsize at higher levels
This commit is contained in:
commit
a0ec50c2dc
@ -1192,8 +1192,8 @@ static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params)
|
||||
if (params->ldmParams.enableLdm) {
|
||||
/* In Long Range Mode, the windowLog is typically oversized.
|
||||
* In which case, it's preferable to determine the jobSize
|
||||
* based on chainLog instead. */
|
||||
jobLog = MAX(21, params->cParams.chainLog + 4);
|
||||
* based on cycleLog instead. */
|
||||
jobLog = MAX(21, ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy) + 3);
|
||||
} else {
|
||||
jobLog = MAX(20, params->cParams.windowLog + 2);
|
||||
}
|
||||
|
@ -909,7 +909,7 @@ static void FIO_adjustParamsForPatchFromMode(FIO_prefs_t* const prefs,
|
||||
if (fileWindowLog > ZSTD_WINDOWLOG_MAX)
|
||||
DISPLAYLEVEL(1, "Max window log exceeded by file (compression ratio will suffer)\n");
|
||||
comprParams->windowLog = MIN(ZSTD_WINDOWLOG_MAX, fileWindowLog);
|
||||
if (fileWindowLog > ZSTD_cycleLog(cParams.hashLog, cParams.strategy)) {
|
||||
if (fileWindowLog > ZSTD_cycleLog(cParams.chainLog, cParams.strategy)) {
|
||||
if (!prefs->ldmFlag)
|
||||
DISPLAYLEVEL(1, "long mode automatically triggered\n");
|
||||
FIO_setLdmFlag(prefs, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user