Commit 6742ae8
Feature/warm cache spi and stats and wiring foyer with tiered object store (opensearch-project#21530)
* Unified Cache Service
* Add block cache SPI and Foyer plugin for warm nodes
Introduces a plugin-extensible block cache layer on warm nodes that caches
variable-size byte ranges (Parquet column chunks, remote segment reads) on
local SSD alongside the existing FileCache.
Core changes:
- BlockCacheProvider SPI: plugins declare their cache and report how much
SSD budget they need. Node.java partitions the warm-node SSD budget
between FileCache and all registered block-cache plugins before any
createComponents() call, so capacities are consistent at startup.
- BlockCacheStats (11-field record): universal stats contract across the
plugin boundary, including hit/miss byte counts and eviction bytes.
- NodeCacheOrchestrator: owns SSD budget validation, FileCache lifecycle,
and block cache registration. Replaces UnifiedCacheService.
- _nodes/stats aggregate_file_cache now folds block cache counters
(hits, misses, eviction bytes, used bytes, total capacity) into the
existing warm-node stats sections via mergeStats().
- WarmFsService virtual capacity formula updated: total virtual bytes now
equals (fileCacheRatio × fileCacheCapacity) + Σ(plugin virtual bytes).
Foyer plugin (sandbox):
- BlockCacheFoyerPlugin: implements BlockCacheProvider, owns all four
Foyer settings (block_cache.size, block_cache.block_size,
block_cache.io_engine, block_cache.data_to_cache_ratio).
- FoyerAggregatedStats: parses two-section native FFM buffer into
BlockCacheStats records without wire serialization.
- FoyerStatsCounter: atomic counters updated on every hot-path operation.
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Simplify and optimise warm stats
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
* Simplify and optimise warm stats
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
* _nodes/stats to respond with aggregated stats
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Add tests
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* rename settings
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* spotless fix
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* spotless fix
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Integerate foyer with tiered object store
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* address PR comments, add removed, removed, handle tiered_object_store on remove cache clear
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* address PR comments, add removed, removed, handle tiered_object_store on remove cache clear
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Fix tiered directory tests
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Fix DF test
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
* Additional tests and fixes
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
---------
Signed-off-by: Vishwas Garg <glvishwa@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Vishwas Garg <glvishwa@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>1 parent a8c9190 commit 6742ae8
55 files changed
Lines changed: 4078 additions & 530 deletions
File tree
- sandbox
- libs/tiered-storage/src/main/rust
- src
- plugins
- analytics-backend-datafusion/src/test/java/org/opensearch/be/datafusion
- block-cache-foyer/src
- main
- java/org/opensearch/blockcache/foyer
- rust/src
- foyer
- test/java/org/opensearch/blockcache/foyer
- parquet-data-format/src/main/java/org/opensearch/parquet/store
- server/src
- main/java/org/opensearch
- common/settings
- index
- engine/dataformat
- store/remote/filecache
- indices
- monitor/fs
- node
- plugins
- storage/directory
- test/java/org/opensearch
- index/store/remote/filecache
- monitor/fs
- node
- storage/directory
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | | - | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | | - | |
100 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
101 | 116 | | |
102 | 117 | | |
103 | 118 | | |
| |||
117 | 132 | | |
118 | 133 | | |
119 | 134 | | |
120 | | - | |
| 135 | + | |
121 | 136 | | |
122 | 137 | | |
123 | 138 | | |
| |||
130 | 145 | | |
131 | 146 | | |
132 | 147 | | |
133 | | - | |
| 148 | + | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
| |||
144 | 159 | | |
145 | 160 | | |
146 | 161 | | |
147 | | - | |
| 162 | + | |
148 | 163 | | |
149 | 164 | | |
150 | 165 | | |
| |||
223 | 238 | | |
224 | 239 | | |
225 | 240 | | |
| 241 | + | |
226 | 242 | | |
227 | 243 | | |
228 | 244 | | |
| |||
Lines changed: 66 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
0 commit comments