-
Notifications
You must be signed in to change notification settings - Fork 522
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
[feat]curvefs/client kvcache monitor #2806
[feat]curvefs/client kvcache monitor #2806
Conversation
bac2a5f
to
64f0099
Compare
cicheck |
64f0099
to
d452499
Compare
cicheck |
@@ -5,7 +5,7 @@ | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* http://www.apache.org/licenses/LICENSE-2.0https://godbolt.org/ |
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.
typo?
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.
typo?
fix
case MEMCACHED_DATA_DOES_NOT_EXIST: | ||
// The data requested with the key given was not found. | ||
case MEMCACHED_DATA_EXISTS: |
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.
same meaning of exists and not exist?
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.
same meaning of exists and not exist?
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.
it's interesting
client_ = kvclient; | ||
kvClientManagerMetric_ = std::make_shared<KVClientManagerMetric>(fsName); |
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.
unique_ptr?
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.
|
||
task->done(task); | ||
if (task->res) { | ||
kvClientManagerMetric_->count << 1; |
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.
Now that there are hits and misses, is count redundant?
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.
Now that there are hits and misses, is count redundant?
count means set
hits and miss are get
void KVClientManager::Get(std::shared_ptr<GetKVCacheTask> task) { | ||
threadPool_.Enqueue([task, this]() { | ||
LatencyGuard guard(&kvClientMetric_.kvClientGet.latency); | ||
LatencyGuard guard(&kvClientManagerMetric_->get.latency); |
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.
should we only update metric for susuccessful request?
@@ -104,15 +114,17 @@ class KVClientManager { | |||
|
|||
void Get(std::shared_ptr<GetKVCacheTask> task); |
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.
why shared_ptr?
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.
why shared_ptr?
i don't known
InterfaceMetric get; | ||
InterfaceMetric set; |
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.
what's the difference between KVClientManagerMetric
's get/set ?
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.
what's the difference between
KVClientManagerMetric
's get/set ?
manager will put set task to queue.
this write to memcache
81d0be4
to
cb1a6a5
Compare
@@ -71,7 +72,8 @@ struct GetKVCacheTask { | |||
const std::string& key; | |||
char* value; | |||
uint64_t offset; | |||
uint64_t length; | |||
uint64_t valueLength; | |||
uint64_t length; // actual length of value |
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.
what's the difference?
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.
what's the difference?
One is the length of value, and the other is the length of the object obtained from kvcache.
What's the difference of latency of kvclientmanager and memcachedClient ? |
Are the units of set latency in the kvcache manager panel correct? |
kvCachemanager is used to manage memcacheclient. Because kvcache uses a thread pool for asynchronous IO, and memcacheclient uses synchronous IO. So separating the two shows how long io waits in the queue. |
fix by pr#2808 |
cb1a6a5
to
8cc7ab1
Compare
cicheck |
8cc7ab1
to
4cc32e4
Compare
cicheck |
cicheck |
1 similar comment
cicheck |
4cc32e4
to
4b31b8e
Compare
cicheck |
cicheck |
cicheck |
6 similar comments
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
8 similar comments
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
1. fix base metric(bps/qps/latnecy) error 2. add hit and miss metric 3. change metric prefix to curvefs_kvclient_manager 4. add memcache client metric Signed-off-by: Cyber-SiKu <[email protected]>
4b31b8e
to
5e44c53
Compare
cicheck |
cicheck |
4 similar comments
cicheck |
cicheck |
cicheck |
cicheck |
What problem does this PR solve?
Issue Number: #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List