opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.7k stars 1.79k forks source link

[Feature Request] Support vertical scaling for snapshot repository data cache limit #16298

Open ashking94 opened 2 weeks ago

ashking94 commented 2 weeks ago

Is your feature request related to a problem? Please describe

As of today, the repository data is not cached if the compressed (using default - DEFLATE) size of repository data exceeds 500 KB. This limit has stayed from a long time and has not been changed with increasing heap size. If there are numerous snapshots in a repo that leads to size being more than 500KB, then repository data needs to be downloaded multiple times during clone, restore, finalise snapshots & status/GET snapshot status amongst many other use cases. This leads to elevated latency for these operations. No matter we do vertical scaling or horizontal scaling, the limit stays as is.

Describe the solution you'd like

To mitigate the issue mentioned above, I propose that we have cache size which is x% of heap size. This will allow solutions like vertical scaling to prevent hit to remote store each time for fetch repository data even though it has not been updated.

Related component

Storage:Snapshots

Describe alternatives you've considered

No response

Additional context

No response

inpink commented 2 days ago

Hello, I’d like to work on this issue! I’ll do my best to resolve it as quickly as possible and submit a PR. Thank you for creating this as a good first issue.