From 983413ebe13c9f6ba4627ebe85c953bce12764df Mon Sep 17 00:00:00 2001 From: SungJin1212 Date: Tue, 15 Oct 2024 03:15:25 +0900 Subject: [PATCH] Add index cache max async concurrency (#6265) --- CHANGELOG.md | 1 + docs/blocks-storage/querier.md | 2 +- docs/blocks-storage/store-gateway.md | 2 +- docs/configuration/config-file-reference.md | 2 +- pkg/storage/tsdb/index_cache.go | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23094f9fc5..03a2ddf904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## master / unreleased +* [CHANGE] Change default value of `-blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency` from `50` to `3` #6265 * [CHANGE] Enable Compactor and Alertmanager in target all. #6204 * [FEATURE] Query Frontend/Querier: Add protobuf codec `-api.querier-default-codec` and the option to choose response compression type `-querier.response-compression`. #5527 * [FEATURE] Ruler: Experimental: Add `ruler.frontend-address` to allow query to query frontends instead of ingesters. #6151 diff --git a/docs/blocks-storage/querier.md b/docs/blocks-storage/querier.md index fbc9e51e49..4d9a0af9e6 100644 --- a/docs/blocks-storage/querier.md +++ b/docs/blocks-storage/querier.md @@ -794,7 +794,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur # when backfilling cache items. # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed when # backfilling cache items. diff --git a/docs/blocks-storage/store-gateway.md b/docs/blocks-storage/store-gateway.md index 8817bdc511..66047f3c52 100644 --- a/docs/blocks-storage/store-gateway.md +++ b/docs/blocks-storage/store-gateway.md @@ -891,7 +891,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur # when backfilling cache items. # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed when # backfilling cache items. diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index 72ddeb1b25..2a601053c2 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -1327,7 +1327,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur when # backfilling cache items. # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed when # backfilling cache items. diff --git a/pkg/storage/tsdb/index_cache.go b/pkg/storage/tsdb/index_cache.go index 7450689652..ae30154d9f 100644 --- a/pkg/storage/tsdb/index_cache.go +++ b/pkg/storage/tsdb/index_cache.go @@ -132,7 +132,7 @@ func (cfg *MultiLevelIndexCacheConfig) Validate() error { } func (cfg *MultiLevelIndexCacheConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string) { - f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 50, "The maximum number of concurrent asynchronous operations can occur when backfilling cache items.") + f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 3, "The maximum number of concurrent asynchronous operations can occur when backfilling cache items.") f.IntVar(&cfg.MaxAsyncBufferSize, prefix+"max-async-buffer-size", 10000, "The maximum number of enqueued asynchronous operations allowed when backfilling cache items.") f.IntVar(&cfg.MaxBackfillItems, prefix+"max-backfill-items", 10000, "The maximum number of items to backfill per asynchronous operation.") }