-
Notifications
You must be signed in to change notification settings - Fork 206
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
fscache: enable multi-threading to process fscache requests #536
Conversation
@jiangliu , a new test job has been submitted. Please wait in patience. |
Add command line option "fscache-threads" to nydusd to support multi-threading for fscache service. There's one thread to receive fscache request from cachefile fd, and dispatch `READ` requests to multiple working threads through a multi-producer, multi-consumer channel. We have observed about 40% performance boost when serving some multi threading container workloads. Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
@jiangliu , your pull request has been updated. A new test job will be submitted. Please wait in patience. |
@jiangliu , the test job has been submitted. Please wait in patience. |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
LGTM, |
@@ -117,16 +120,33 @@ impl ServiceController { | |||
}; | |||
let tag = subargs.value_of("fscache-tag"); | |||
|
|||
let mut threads = 1usize; | |||
if let Some(threads_value) = subargs.value_of("fscache-threads") { | |||
if let Ok(t) = threads_value.parse::<i32>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can reuse the validator code above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please help to give more hints about the way to reuse code? I haven't found similar pieces of code yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is like this :)
Add command line option "fscache-threads" to nydusd to support
multi-threading for fscache service. There's one thread to receive
fscache request from cachefile fd, and dispatch
READ
requests tomultiple working threads through a multi-producer, multi-consumer
channel.
We have observed about 40% performance boost when serving some multi
threading container workloads.
Signed-off-by: Jiang Liu gerry@linux.alibaba.com