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

ZStd JNI vs Aircompressor pure java performance question #174

Open
nknize opened this issue Aug 18, 2023 · 3 comments
Open

ZStd JNI vs Aircompressor pure java performance question #174

nknize opened this issue Aug 18, 2023 · 3 comments

Comments

@nknize
Copy link

nknize commented Aug 18, 2023

OpenSearch is evaluating the pure java implementation of Zstd using AirCompressor. I stumbled on a thoughtful comment here which certainly aligns to the reasons we avoid jni code as "top level" modules or plugins on OpenSearch core (we have similar reasons on Lucene). We realize that comment is now five years old, and so @reta ran benchmarks that seem to show significant performance differences between the pure java implementation (hotspot has gotten better of course) and jni. Do these number look valid to folks on this project? What are the potential pitfalls to running those benchmarks that we need to be aware of? Are there certain config conditions that should be followed to squeeze better performance?

Thanks in advance for any assistance that can be provided.

@nknize nknize changed the title ZStd JNI vs Airlift pure java performance question ZStd JNI vs Aircompressor pure java performance question Aug 18, 2023
@reta
Copy link

reta commented Aug 18, 2023

For context, I run the io.airlift.compress.benchmark.CompressionBenchmark (i7-10750H × 12, 64Gb, Linux/Ubuntu, JDK 17.0.8), no modifications, selectively picked the airlift_zstd / zstd_jni since this is what we've been looking for, thank you.

@nknize
Copy link
Author

nknize commented Aug 29, 2023

Quick ping check in on this... any maintainers here able to give some guidance?

@tianjiqx
Copy link

image

Perhaps I have the same test results and found that zstd_jni actually performs better.
The same implementation of Lz4 also results in better performance for JNI.

2024-04-18_15-53

Jdk: 17
Os: ubuntu22.04
CPU: AMD ® Ryzen 7 7840hs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants