Skip to content

Conversation

@huww98
Copy link
Contributor

@huww98 huww98 commented Jan 20, 2026

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?

disk: support using a faster disk as a cache layer over cloud disk.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2026
@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2026
@huww98 huww98 force-pushed the local-disk-cache branch 2 times, most recently from e589fbe to 09b5bf8 Compare January 22, 2026 11:59
Copy link
Contributor

@mowangdk mowangdk left a 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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants