Skip to content
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

[Searchable Snapshot] Implement disk reservation logic to be used for local file system cache #5508

Closed
Tracked by #5087
aabukhalil opened this issue Dec 9, 2022 · 0 comments · Fixed by #6350
Closed
Tracked by #5087
Assignees
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request Indexing & Search

Comments

@aabukhalil
Copy link
Contributor

Referring to #4964,

Cache Disk reservation logic will impact all of:

  • NodesStats as fs stats need to take into consideration the cache reserved size
  • DiskThresholdDecider once monitor service having the reservation logic injected it should work out of the box
  • MonitorService need to take into consideration the cache reserved size
  • org.opensearch.cluster.ClusterInfo::reservedSpace
  • org.opensearch.cluster.InternalClusterInfoService::buildShardLevelInfo
  • org.opensearch.index.store.StoreStats##reservedSize
    so that
    org.opensearch.cluster.routing.allocation.DiskThresholdMonitor
    and
    org.opensearch.cluster.routing.allocation.decider.DiskThresholdDecider
    take into consideration the new disk reservation logic

Reservation Logic

When creating the cache, a validations are needed to make sure:

  • (cache defined reserved size - current cache phantom files + lucene indices file size) <= cluster.routing.allocation.disk.watermark.high and cluster.routing.allocation.disk.watermark.low and so on
  • When cache is initiated on node start procedure, it's needed to walk through cache dir files and count their sizes
  • For now we don't need to handle logic if cache data path has changed and old path has ghost files

Outcome of this

add fields reservedCacheSize and currentCacheSize to org.opensearch.env.NodeEnvironment.NodePath
and make these fields reflected correctly in org.opensearch.monitor.fs.FsProbe#getFSInfo to have semantic of
given Cache max reserved size, current cache occupied size, Implement size reservation logic to be reflected on NodesStats::FileSystemStats, Deciders, Monitoring Service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request Indexing & Search
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants