We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
This note is used to track performance improvement.
Please let me know for any ideas.
To spawn a new task on tokio runtime, we can't have reference:
spawn
fn spawn<T>(&self, future: T) -> JoinHandle<T::Output> where T: Future + Send + 'static, T::Output: Send + 'static, { match self { Executor::External => tokio::spawn(future), Executor::Global => GLOBAL_EXECUTOR.spawn(future), Executor::Internal() => unimplemented!(), } }
So we have to take an owned buf like monoio and tokio-uring:
monoio
tokio-uring
fn read(&self, path: &str, offset: u64, buf: Vec<u8>) -> JoinHandle<Result<(usize, Vec<u8>)>> { let (_, _, _) = (path, offset, buf); unimplemented!() } fn write(&self, path: &str, buf: Vec<u8>) -> JoinHandle<Result<()>> { let (_, _) = (path, buf); unimplemented!() }
However, these API requires extra alloc and memory copy which drops 50% read performance.
Here is another try that keeps returning BoxedAsyncRead:
BoxedAsyncRead
fn read(&self, path: &str, offset: u64, size: u64) -> JoinHandle<Result<BoxedAsyncRead>> { let (_, _, _) = (path, offset, size); unimplemented!() }
There is no significant performance on regular benches, but we can find performance drops under parallel read benches.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This note is used to track performance improvement.
Please let me know for any ideas.
Possible Ideas
Not work
Self-maintained runtime
To
spawn
a new task on tokio runtime, we can't have reference:So we have to take an owned buf like
monoio
andtokio-uring
:However, these API requires extra alloc and memory copy which drops 50% read performance.
Here is another try that keeps returning
BoxedAsyncRead
:There is no significant performance on regular benches, but we can find performance drops under parallel read benches.
The text was updated successfully, but these errors were encountered: