-
Notifications
You must be signed in to change notification settings - Fork 253
disk: introduce data cache #1621
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: huww98 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e589fbe to
09b5bf8
Compare
Use a faster disk as a cache layer over cloud disk.
09b5bf8 to
0e9f46b
Compare
mowangdk
left a comment
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.
Basically this is a POC PR, Please transition the PR into a mergeable ones.
| return fmt.Errorf("must specify non-zero %s for dataCache", DataCacheSizeKey) | ||
| } | ||
| if d.Mode == "" { | ||
| d.Mode = DataCacheWritethrough |
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 prefer to enable Write-back mode by default to push the performance to its maximum potential. For data-critical applications like databases, the risk is mitigated at the application layer, where internal binlogs and WAL are already in place to ensure high availability and data consistency
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.
enable Write-back mode by default
Then we need to wait for write back on unstage. This could take quite a long time. So this should only be enabled at new Kubernetes version, which don't do force detach when the node is healthy.
For data-critical applications like databases
I'm not sure how much benifest there are. Database issues fsync() frequently, which will force write-back from Google search. And RAM can also hold some dirty cache. Do you think DBs need GBs of dirty cache that RAM cannot handle?
| }, | ||
| } | ||
| copy(conf.Info.File_name[:], path) | ||
| err = unix.IoctlLoopConfigure(loop, &conf) // Since Linux kernel 5.8 |
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.
TODO: add this limitation in docs
| omitfsck = true | ||
| } | ||
|
|
||
| // Setup DataCache |
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.
We need to eliminate cache devices from the VFIO stack to prevent incompatibility issues.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Use a faster disk as a cache layer over cloud disk.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: