fix : no longer slow down on input saturation
only slows down when all buffers are full
This commit is contained in:
+6
-3
@@ -808,9 +808,12 @@ FIO_compressZstdFrame(const cRess_t* ressPtr,
|
|||||||
|
|
||||||
cpszfp = zfp;
|
cpszfp = zfp;
|
||||||
|
|
||||||
if ( (zfp.ingested == cpszfp.ingested)
|
if ( (zfp.ingested == cpszfp.ingested) /* no data read : input buffer full */
|
||||||
&& (zfp.consumed == cpszfp.consumed) ) {
|
&& (zfp.consumed == cpszfp.consumed) /* no data compressed : no more buffer to compress OR compression is really slow */
|
||||||
DISPLAYLEVEL(2, "no data read nor consumed : buffers are full (?) output is too slow => slow down ; or compression is slow + input has reached its limit => can't tell \n")
|
&& (zfp.nbActiveWorkers == 0) /* confirmed : no compression : either no more buffer to compress OR not enough data to start first worker */
|
||||||
|
&& (zfp.currentJobID > 0) /* first job started : only remaining reason is no more available buffer to start compression */
|
||||||
|
) {
|
||||||
|
DISPLAYLEVEL(6, "all buffers full : compression stopped => slow down \n")
|
||||||
speedChange = slower;
|
speedChange = slower;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user