-
Notifications
You must be signed in to change notification settings - Fork 590
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
Performance: prefetch data from S3 #2860
Comments
For small point queries, I think LRU is enough, and it may be hard to predict incoming data or user's query 🤔 So we may start from big range queries? |
We can not fetch the whole SST because it may hold the whole data of this compaction task in memory.... |
for big range queries, it's hard for hummock to judge how much data we shall prefetch.... |
Another form of prefetch: |
Exactly. What I am thinking of is: after compaction, block cache (and disk-based secondary cache in the future) is refilled by some heuristics while the blocks of pre-compacted SSTs are still usable until the prefetch finish. In this way, we can reduce cache miss caused by compaction. |
Yes, we should bound the working set of compactor to avoid OOM but try to prefetch as much as possible. |
we can refill this cache just after we pinned a new version. |
There is actually count min sketch for this to do so space efficiently... Feels like this is related to prefix bloom filter as well. And we need e.g. table schema for the variable length prefix here too. |
If we can enable prefetch, we can set block size back to 64KB. Related PR: #3463 |
To improve performance and reduce cost (S3 charges money per GET request), it is time to think about a better prefetch strategy instead of only reading one block at a time from S3.
For compactor, I think we can always prefetch the whole SST since we will read all its data anyway. #2630 has implemented simple prefetch for compaction.
For compute node, I think we need some heuristic to do the prefetch (e.g. size based with some exponential factors). Can the prefetch strategy adjust to the workload?
The text was updated successfully, but these errors were encountered: