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

What happened of idea using Pure java implementation from jVerbs? #48

Closed
pranasblk opened this issue Aug 12, 2019 · 3 comments
Closed

Comments

@pranasblk
Copy link

I was browsing predecessor jVerbs project's documents and saw one of the goals to eliminate JNI calls.
Was this approach proven not practical?

Thanks for the clarifications on dev direction!

@patrickstuedi
Copy link
Member

Good question. How DiSNI got started was indeed with the pure Java based implementation named jVerbs. The catch, however, was that jVerbs introduced a concept called stateful verbs calls (SVCs). With SVCs, a verbs call like a post send is managed entirely in Java, that is, all the memory used for storing the decscriptor, sg elements, etc., is serialized into Java out-of-heap memory and then written to the hardware directly over memory mapped queues. Later, SVCs turned out to be an efficient way to bypass the JNI boundaries, that is, one can just pass the out-of-heap address of the SVC object to a JNI call and let the C backend interact with the hardware. The overhead of the JNI call is negligible because the call is literally just having one base type parameter which is the address of the SVC object.. With almost no overhead the JNI approach turned out to be more robust and didn't require us to implement vendor specific functionality in Java, like how to access the hardware queue. So over time, the JNI approach replaced the pure Java approach and I don't even know if the pure Java code is stored somewhere still. Does that make sense?

@pranasblk
Copy link
Author

pranasblk commented Aug 12, 2019 via email

@PepperJo
Copy link
Contributor

PepperJo commented Aug 12, 2019

The bigger problem with the Java only approach is ever changing RDMA user-space libraries and support for all the different libraries. Basically everytime one of the RMDA user libraries (e.g. libmlx or libcxgb) is changed you have to adapt your Java code to reflect the changes. That is not sustainable on the long run. With the current approach we have very little C code in DiSNI mostly wrappers around the libibverbs and librdmacm libraries.

@PepperJo PepperJo closed this as completed Apr 2, 2020
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