-
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/change disk cache conf on fly #2728
Feat/curvefs/client/change disk cache conf on fly #2728
Conversation
cicheck |
curvefs/conf/client.conf
Outdated
@@ -245,9 +245,10 @@ diskCache.trimCheckIntervalSec=5 | |||
# the interval of check to trim load file to s3 | |||
diskCache.asyncLoadPeriodMs=5 | |||
# start trim file when disk cache use ratio is Greater than fullRatio, | |||
# util less than safeRatio | |||
# util less than safeRatio * trimeRatio / 100 |
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.
trimeRatio -> trimRatio
Is the time point of start trim reaching fullRatio or trimRatio? Fix code comments if reach trimRatio
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.
trimeRatio -> trimRatio Is the time point of start trim reaching fullRatio or trimRatio? Fix code comments if reach trimRatio
fullRatio start to trim
<< ", usedBytes is: " << usedBytes | ||
<< ", use ratio is: " << ratio; | ||
<< ", usedBytes is: " << usedBytes << ", use ratio is: " << ratio | ||
<< ", baseRatio is: " << baseRatio; | ||
return false; | ||
} | ||
|
||
// TODO(wuhongsong): | ||
// See Also: https://github.com/opencurve/curve/issues/1534 | ||
bool DiskCacheManager::IsExceedFileNums() { | ||
uint64_t fileNums = cachedObjName_->Size(); |
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.
Implementation of Size()
may have problem, access size_
should protected by lock.
@@ -53,6 +56,19 @@ DEFINE_validator(avgReadFileBytes, &pass_uint64); | |||
DEFINE_uint64(avgReadFileIops, 0, "the read throttle iops of disk cache"); | |||
DEFINE_validator(avgReadFileIops, &pass_uint64); | |||
|
|||
DEFINE_uint32(diskNearFullRatio, 70, "the nearfull ratio of disk cache"); |
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: nearful
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: nearful
fix
177837e
to
14731c9
Compare
62b1d54
to
d5a9de4
Compare
Signed-off-by: Cyber-SiKu <[email protected]>
d5a9de4
to
d5af8dc
Compare
cicheck |
1 similar comment
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