-
Notifications
You must be signed in to change notification settings - Fork 82
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
[Feature requirement] Support extra read on core to warm cache #629
Comments
Hi @beef9999 . Currently we do not have any plans to implement prefetch. However we surely can consider this. From technical perspective implementing prefetch in OCF comes with some trade-offs. Normally OCF uses user provided buffers to read data from core, while for prefetch it would need to allocate bigger buffer and then perform memcpy to user buffer. That would increase both latency and CPU utilization.
|
Yes. As the core is remote, even possibly geographically distributed, extra resource is definitely acceptable.
A simplest approach is a configurable larger refill unit, e.g. 64KB, so that cache will read data from core in unit of 64KB (also aligned to that).
It's better configurable. WAN needs bigger prefetches, while LAN needs smaller ones. |
The containerd/overlaybd project is focused on next generation container remote image, and cache has been playing an important role in the whole architecture. We have just released a new file cache that was built on top of OCF:
The soon the better... For now the performance of the new ocf cache is not satisfying as I mentioned above, because of the lack of a proper prefetch. So we didn't make it the default cache choice. I think the priorities to solve this issues would be:
3 is optional. I believe with 1 and 2, I myself can then implement an efficient prefetch. |
This code shows how we do prefetch now in the app side, i.e. , issue a new read in the nearby range every time the core is visited. |
@beef9999 I am the owner the PRC for WSR and OCF, could you please send me one email? [email protected], we can chat a little bit about your requirement and opty size for Xeon CPU and Optane SSD. |
Any update on this issue? Will OCF provide an API to query metadata hit? |
@beef9999 I think we should create three separate GitHub issues for each of those features (with "enhancement" label). It will make it easier to discuss about more specific details of each of them. Currently we do not have any definite date when those features would be implemented. We will revisit them planning future releases. |
Hello maintainers, we are using OCF to develop a read-only remote cache, therefore, the core is accessed by remote network and the cache is in local.
OCF's minimum read size is the sector size (512B), and that leads to low efficiency because we have to visit remote core too frequently. A desired way to fix this problem is to read extra data from core (sometimes called prefetch) while cache misses.
Our current implementation (or walk-around) is purely at the upper side. For example, starting a background read task every time the core is read, within a designated nearby range. But it may still cause duplicate read, because user doesn't know if any part of range is already filled, based on the existing OCF APIs. Maybe it should be done in the lower side (OCF itself), with a large and continuous read, and skip the filled range automatically?
So do you have plan to add this support? Or at least provide some APIs to tell if the specified cache lines will hit.
The text was updated successfully, but these errors were encountered: