From e3b4ef8ade18fdd8d8461134fa55bea290d65af0 Mon Sep 17 00:00:00 2001 From: SungJin1212 Date: Mon, 4 Nov 2024 17:39:59 +0900 Subject: [PATCH] Change all max async concurrency (#6268) --- CHANGELOG.md | 3 ++- docs/blocks-storage/querier.md | 12 ++++++------ docs/blocks-storage/store-gateway.md | 12 ++++++------ docs/configuration/config-file-reference.md | 12 ++++++------ pkg/storage/tsdb/memcache_client_config.go | 2 +- pkg/storage/tsdb/redis_client_config.go | 2 +- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15eb17c85d..79ed405041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## master / unreleased -* [CHANGE] Change default value of `-blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency` from `50` to `3` #6265 +* [CHANGE] Change all max async concurrency default values `50` to `3` #6268 +* [CHANGE] Change default value of `-blocks-storage.bucket-store.index-cache.multilevel.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 bdf1e3243e..6596d1cadb 100644 --- a/docs/blocks-storage/querier.md +++ b/docs/blocks-storage/querier.md @@ -620,7 +620,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-buffer-size @@ -726,7 +726,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-buffer-size @@ -860,7 +860,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-buffer-size @@ -961,7 +961,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-buffer-size @@ -1101,7 +1101,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-buffer-size @@ -1202,7 +1202,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-buffer-size diff --git a/docs/blocks-storage/store-gateway.md b/docs/blocks-storage/store-gateway.md index b7c353a871..08ef369a85 100644 --- a/docs/blocks-storage/store-gateway.md +++ b/docs/blocks-storage/store-gateway.md @@ -711,7 +711,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-buffer-size @@ -817,7 +817,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-buffer-size @@ -951,7 +951,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-buffer-size @@ -1052,7 +1052,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-buffer-size @@ -1192,7 +1192,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-buffer-size @@ -1293,7 +1293,7 @@ blocks_storage: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-buffer-size diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index 3deb52384d..16b9616df1 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -1165,7 +1165,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.memcached.max-async-buffer-size @@ -1270,7 +1270,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.index-cache.redis.max-async-buffer-size @@ -1403,7 +1403,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.memcached.max-async-buffer-size @@ -1503,7 +1503,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.chunks-cache.redis.max-async-buffer-size @@ -1641,7 +1641,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.memcached.max-async-buffer-size @@ -1741,7 +1741,7 @@ bucket_store: # The maximum number of concurrent asynchronous operations can occur. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-concurrency - [max_async_concurrency: | default = 50] + [max_async_concurrency: | default = 3] # The maximum number of enqueued asynchronous operations allowed. # CLI flag: -blocks-storage.bucket-store.metadata-cache.redis.max-async-buffer-size diff --git a/pkg/storage/tsdb/memcache_client_config.go b/pkg/storage/tsdb/memcache_client_config.go index 2a04bcbcf8..239ea228bb 100644 --- a/pkg/storage/tsdb/memcache_client_config.go +++ b/pkg/storage/tsdb/memcache_client_config.go @@ -26,7 +26,7 @@ func (cfg *MemcachedClientConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefi f.StringVar(&cfg.Addresses, prefix+"addresses", "", "Comma separated list of memcached addresses. Supported prefixes are: dns+ (looked up as an A/AAAA query), dnssrv+ (looked up as a SRV query, dnssrvnoa+ (looked up as a SRV query, with no A/AAAA lookup made after that).") f.DurationVar(&cfg.Timeout, prefix+"timeout", 100*time.Millisecond, "The socket read/write timeout.") f.IntVar(&cfg.MaxIdleConnections, prefix+"max-idle-connections", 16, "The maximum number of idle connections that will be maintained per address.") - f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 50, "The maximum number of concurrent asynchronous operations can occur.") + f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 3, "The maximum number of concurrent asynchronous operations can occur.") f.IntVar(&cfg.MaxAsyncBufferSize, prefix+"max-async-buffer-size", 10000, "The maximum number of enqueued asynchronous operations allowed.") f.IntVar(&cfg.MaxGetMultiConcurrency, prefix+"max-get-multi-concurrency", 100, "The maximum number of concurrent connections running get operations. If set to 0, concurrency is unlimited.") f.IntVar(&cfg.MaxGetMultiBatchSize, prefix+"max-get-multi-batch-size", 0, "The maximum number of keys a single underlying get operation should run. If more keys are specified, internally keys are split into multiple batches and fetched concurrently, honoring the max concurrency. If set to 0, the max batch size is unlimited.") diff --git a/pkg/storage/tsdb/redis_client_config.go b/pkg/storage/tsdb/redis_client_config.go index 02afdd8c98..a0b6529db8 100644 --- a/pkg/storage/tsdb/redis_client_config.go +++ b/pkg/storage/tsdb/redis_client_config.go @@ -55,7 +55,7 @@ func (cfg *RedisClientConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix st f.IntVar(&cfg.GetMultiBatchSize, prefix+"get-multi-batch-size", 100, "The maximum size per batch for mget.") f.IntVar(&cfg.MaxSetMultiConcurrency, prefix+"max-set-multi-concurrency", 100, "The maximum number of concurrent SetMulti() operations. If set to 0, concurrency is unlimited.") f.IntVar(&cfg.SetMultiBatchSize, prefix+"set-multi-batch-size", 100, "The maximum size per batch for pipeline set.") - f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 50, "The maximum number of concurrent asynchronous operations can occur.") + f.IntVar(&cfg.MaxAsyncConcurrency, prefix+"max-async-concurrency", 3, "The maximum number of concurrent asynchronous operations can occur.") f.IntVar(&cfg.MaxAsyncBufferSize, prefix+"max-async-buffer-size", 10000, "The maximum number of enqueued asynchronous operations allowed.") f.StringVar(&cfg.MasterName, prefix+"master-name", "", "Specifies the master's name. Must be not empty for Redis Sentinel.") f.IntVar(&cfg.CacheSize, prefix+"cache-size", 0, "If not zero then client-side caching is enabled. Client-side caching is when data is stored in memory instead of fetching data each time. See https://redis.io/docs/manual/client-side-caching/ for more info.")