FileChannel Implementation #18
Replies: 3 comments 11 replies
-
Wow! This is really awesome! I Fully agree that it would benefit from a Filechannel implementation. I didn't have time yet to check out the code and give it a try myself (will do later this week). There is quite a gap between those it seems. My first guess would be the sequential reads, JUring doesn't perform those as good as Random reads. The MAX_IN_FLIGHT might also cause some performance degradation but I would have to try it to be sure. Another path (maybe) worth exploring is that if the source and target FilleChannels are both from JUring it could just pass the pointer of the buffer to the write operation. This would save a lot object creations and maybe give a little boost. Will also check out the current Filechannel implementation to see what that is doing to get that score. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick roundturn @davidtos, appreciated. So two things are needed indeed:
As I said, I am just trying to understand all this stuff and I am not to concerned on |
Beta Was this translation helpful? Give feedback.
-
Greetings! I made quite some progress and have developed a better understanding of
I would like to ask to have a look at my code at https://github.com/manticore-projects/JUring/tree/filechannel and kindly give some feedback. I am confident that some of this stuff can be merged and I am more than willing to iron out any obstacles before sending a PR. Thanks and cheers! |
Beta Was this translation helpful? Give feedback.
-
Greetings!
The idea of JUring is fantastic but I feel broader adoption will benefit from an implementation of the
FileChannel
interface.For example, the Java H2 database allows plugin in any
FileChannel
implementation directly and certainly would benefit from JUring on Linux.So I have started some work: https://github.com/manticore-projects/JUring/tree/filechannel
gradle jmh
is just simple)Its very early POC and basically I have no idea what I am doing, but at least some basic tests work.
I am facing one big challenge though:
FileChannel.transferTo()
is much slower for the JUring backend compared to the standard NIO -- and I do not understand why.Certainly I am doing things wrong but I would kindly ask for some pointers please.
Beta Was this translation helpful? Give feedback.
All reactions