You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Charles Connell (Jira)" <ji...@apache.org> on 2024/04/04 20:00:00 UTC

[jira] [Created] (HBASE-28485) Re-use ZstdDecompressCtx/ZstdCompressCtx for performance

Charles Connell created HBASE-28485:
---------------------------------------

             Summary: Re-use ZstdDecompressCtx/ZstdCompressCtx for performance
                 Key: HBASE-28485
                 URL: https://issues.apache.org/jira/browse/HBASE-28485
             Project: HBase
          Issue Type: Improvement
            Reporter: Charles Connell
            Assignee: Charles Connell


The zstd documentation recommends re-using context objects when possible, because their creation has some expense. They can be more cheaply reset than re-created. In ZstdDecompressor and ZstdCompressor, we create a new context object for every call to decompress() and compress(). In CPU profiles I've taken at my company, the constructor of ZstdDecompressCtx can sometimes represent 10-25% of the time spent in zstd decompression, which itself is 5-10% of a RegionServer's total CPU time. Avoiding this performance penalty won't lead to any massive performance boost, but is a nice little win.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)