Skip to content

Commit 6cfcb34

Browse files
authored
Documentation and CHANGELOG.md entry for #2579. (#2618)
* Documentation and CHANGELOG.md entry for #2579. Signed-off-by: Peter Štibraný <[email protected]> * Document hidden option to configure caching bucket, to make it less hidden. Signed-off-by: Peter Štibraný <[email protected]> * Removed mention of caching_config. Signed-off-by: Peter Štibraný <[email protected]> * Added periods. Signed-off-by: Peter Štibraný <[email protected]>
1 parent 11c75ae commit 6cfcb34

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ We use *breaking* word for marking changes that are not backward compatible (rel
2323
- [#2502](https://github.com/thanos-io/thanos/pull/2502) Added `hints` field to `SeriesResponse`. Hints in an opaque data structure that can be used to carry additional information from the store and its content is implementation specific.
2424
- [#2521](https://github.com/thanos-io/thanos/pull/2521) Sidecar: add `thanos_sidecar_reloader_reloads_failed_total`, `thanos_sidecar_reloader_reloads_total`, `thanos_sidecar_reloader_watch_errors_total`, `thanos_sidecar_reloader_watch_events_total` and `thanos_sidecar_reloader_watches` metrics.
2525
- [#2412](https://github.com/thanos-io/thanos/pull/2412) ui: add React UI from Prometheus upstream. Currently only accessible from Query component as only `/graph` endpoint is migrated.
26-
- [#2532](https://github.com/thanos-io/thanos/pull/2532) Store: Added hidden option for experimental caching bucket, that can cache chunks into shared memcached. This can speed up querying and reduce number of requests to object storage.
26+
- [#2532](https://github.com/thanos-io/thanos/pull/2532) Store: Added hidden option `--store.caching-bucket.config=<yaml content>` (or `--store.caching-bucket.config-file=<file.yaml>`) for experimental caching bucket, that can cache chunks into shared memcached. This can speed up querying and reduce number of requests to object storage.
27+
- [#2579](https://github.com/thanos-io/thanos/pull/2579) Store: Experimental caching bucket can now cache metadata as well. Config has changed from #2532.
2728

2829
### Changed
2930

docs/components/store.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -280,31 +280,45 @@ While the remaining settings are **optional**:
280280

281281
## Caching Bucket
282282

283-
Thanos Store Gateway supports a "caching bucket" with chunks caching to speed up loading of chunks from TSDB blocks. Currently only memcached "backend" is supported:
283+
Thanos Store Gateway supports a "caching bucket" with chunks and metadata caching to speed up loading of chunks from TSDB blocks. To configure caching, one needs to use `--store.caching-bucket.config=<yaml content>` or `--store.caching-bucket.config-file=<file.yaml>`.
284+
285+
Currently only memcached "backend" is supported:
284286

285287
```yaml
286288
backend: memcached
287289
backend_config:
288290
addresses:
289291
- localhost:11211
290292
291-
caching_config:
292-
chunk_subrange_size: 16000
293-
max_chunks_get_range_requests: 3
294-
chunk_object_size_ttl: 24h
295-
chunk_subrange_ttl: 24h
293+
chunk_subrange_size: 16000
294+
max_chunks_get_range_requests: 3
295+
chunk_object_size_ttl: 24h
296+
chunk_subrange_ttl: 24h
297+
blocks_iter_ttl: 5m
298+
metafile_exists_ttl: 2h
299+
metafile_doesnt_exist_ttl: 15m
300+
metafile_content_ttl: 24h
301+
metafile_max_size: 1MiB
296302
```
297303

298304
`backend_config` field for memcached supports all the same configuration as memcached for [index cache](#memcached-index-cache).
299305

300-
`caching_config` is a configuration for chunks cache and supports the following optional settings:
306+
Additional options to configure various aspects of chunks cache are available:
301307

302308
- `chunk_subrange_size`: size of segment of chunks object that is stored to the cache. This is the smallest unit that chunks cache is working with.
303309
- `max_chunks_get_range_requests`: how many "get range" sub-requests may cache perform to fetch missing subranges.
304310
- `chunk_object_size_ttl`: how long to keep information about chunk file length in the cache.
305311
- `chunk_subrange_ttl`: how long to keep individual subranges in the cache.
306312

307-
Note that chunks cache is an experimental feature, and these fields may be renamed or removed completely in the future.
313+
Following options are used for metadata caching (meta.json files, deletion mark files, iteration result):
314+
315+
- `blocks_iter_ttl`: how long to cache result of iterating blocks.
316+
- `metafile_exists_ttl`: how long to cache information about whether meta.json or deletion mark file exists.
317+
- `metafile_doesnt_exist_ttl`: how long to cache information about whether meta.json or deletion mark file doesn't exist.
318+
- `metafile_content_ttl`: how long to cache content of meta.json and deletion mark files.
319+
- `metafile_max_size`: maximum size of cached meta.json and deletion mark file. Larger files are not cached.
320+
321+
Note that chunks and metadata cache is an experimental feature, and these fields may be renamed or removed completely in the future.
308322

309323
## Index Header
310324

0 commit comments

Comments
 (0)