Comments (9)
from ocf.
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.
-
Is that additional latency / CPU utilization cost is acceptable in your scenario?
-
Is your application able to provide any hint about when prefetch would be needed? (That would potentially decrease amount of memcpy operations.)
-
How big prefetches would be needed? Close to cache line size of much bigger?
-
What is expected timeframe? When this feature would be needed?
from ocf.
- Is that additional latency / CPU utilization cost is acceptable in your scenario?
Yes. As the core is remote, even possibly geographically distributed, extra resource is definitely acceptable.
- Is your application able to provide any hint about when prefetch would be needed? (That would potentially decrease amount of memcpy operations.)
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).
Higher level approaches are also desirable, such as intelligent prefetching based-on realtime access pattern, or trace-based prefetching.
- How big prefetches would be needed? Close to cache line size of much bigger?
It's better configurable. WAN needs bigger prefetches, while LAN needs smaller ones.
from ocf.
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:
What is expected timeframe? When this feature would be needed?
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:
- OCF provides an API to query metadata hit
- OCF supports larger metadata, like 512KB
- OCF supports prefetch internally
3 is optional. I believe with 1 and 2, I myself can then implement an efficient prefetch.
from ocf.
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.
from ocf.
@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.
from ocf.
Any update on this issue? Will OCF provide an API to query metadata hit?
from ocf.
@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.
from ocf.
This enhancement has been split into three separate entries: #674, #675 and #676. I'm closing the original one.
from ocf.
Related Issues (20)
- [ocf env] The completion order is not correct. HOT 1
- Crash during failover standby initialization: BUG_ON() in metadata_raw.c:276
- [Enhancement] Need for larger cache-line size
- ocf_io_set_data() does not accept offset != 0
- Make it possible to configure promotion policy separately for reads and writes HOT 1
- Memory Leak for seq cutoff initialization HOT 3
- Sporadically pyocf Queue will raise RuntimeException in test HOT 1
- Cache exported object returns error from submit_flush() if no data set in io
- Provide API to query metadata hit
- Add support for bigger cache line sizes
- Add inteligent cache prefetch
- BUG() in cleaning_policy_acp_init_common() during activate (acp.c:288)
- inaccuracies in sequential cutoff promotion logic
- Cannot copy large file into VM when using OCF in SPDK
- OCF hangs after a very specific I/O pattern
- OCF crashes on big flush requests
- OCF doesn't properly identify sequential IO and splits cache requests HOT 1
- If eviction failed, clean data from any partition
- Is open cas ocf continuously maintained and updated? Or has open cas ocf become an abandoned project? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocf.