From 4eb6c90741f8ddf4a15da041fc4e93b3ed6a4e33 Mon Sep 17 00:00:00 2001 From: Justin Lei Date: Wed, 15 Nov 2023 12:43:39 -0800 Subject: [PATCH] Remove deprecated bucket store flags The following deprecated flags are removed: - `-blocks-storage.bucket-store.max-chunk-pool-bytes` - `-blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes` - `-blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes` See https://github.com/grafana/mimir/pull/4996 for more details. --- cmd/mimir/config-descriptor.json | 33 ------------------- cmd/mimir/help-all.txt.tmpl | 6 ---- .../configuration-parameters/index.md | 13 -------- .../components/config/kustomization.yaml | 2 -- .../charts/mimir-distributed/CHANGELOG.md | 1 + pkg/storage/tsdb/config.go | 26 --------------- 6 files changed, 1 insertion(+), 80 deletions(-) diff --git a/cmd/mimir/config-descriptor.json b/cmd/mimir/config-descriptor.json index 0df7a897392..a6603c592d7 100644 --- a/cmd/mimir/config-descriptor.json +++ b/cmd/mimir/config-descriptor.json @@ -8118,39 +8118,6 @@ "fieldType": "duration", "fieldCategory": "advanced" }, - { - "kind": "field", - "name": "max_chunk_pool_bytes", - "required": false, - "desc": "Max size - in bytes - of a chunks pool, used to reduce memory allocations. The pool is shared across all tenants. 0 to disable the limit.", - "fieldValue": null, - "fieldDefaultValue": 2147483648, - "fieldFlag": "blocks-storage.bucket-store.max-chunk-pool-bytes", - "fieldType": "int", - "fieldCategory": "deprecated" - }, - { - "kind": "field", - "name": "chunk_pool_min_bucket_size_bytes", - "required": false, - "desc": "Size - in bytes - of the smallest chunks pool bucket.", - "fieldValue": null, - "fieldDefaultValue": 16000, - "fieldFlag": "blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes", - "fieldType": "int", - "fieldCategory": "deprecated" - }, - { - "kind": "field", - "name": "chunk_pool_max_bucket_size_bytes", - "required": false, - "desc": "Size - in bytes - of the largest chunks pool bucket.", - "fieldValue": null, - "fieldDefaultValue": 50000000, - "fieldFlag": "blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes", - "fieldType": "int", - "fieldCategory": "deprecated" - }, { "kind": "field", "name": "series_hash_cache_max_size_bytes", diff --git a/cmd/mimir/help-all.txt.tmpl b/cmd/mimir/help-all.txt.tmpl index a612c101cf4..38547f511cf 100644 --- a/cmd/mimir/help-all.txt.tmpl +++ b/cmd/mimir/help-all.txt.tmpl @@ -303,10 +303,6 @@ Usage of ./cmd/mimir/mimir: The maximum allowed age of a bucket index (last updated) before queries start failing because the bucket index is too old. The bucket index is periodically updated by the compactor, and this check is enforced in the querier (at query time). (default 1h0m0s) -blocks-storage.bucket-store.bucket-index.update-on-error-interval duration How frequently a bucket index, which previously failed to load, should be tried to load again. This option is used only by querier. (default 1m0s) - -blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes int - [deprecated] Size - in bytes - of the largest chunks pool bucket. (default 50000000) - -blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes int - [deprecated] Size - in bytes - of the smallest chunks pool bucket. (default 16000) -blocks-storage.bucket-store.chunks-cache.attributes-in-memory-max-items int Maximum number of object attribute items to keep in a first level in-memory LRU cache. Metadata will be stored and fetched in-memory before hitting the cache backend. 0 to disable the in-memory cache. (default 50000) -blocks-storage.bucket-store.chunks-cache.attributes-ttl duration @@ -527,8 +523,6 @@ Usage of ./cmd/mimir/mimir: [experimental] If enabled, store-gateway will persist a sparse version of the index-header to disk on construction and load sparse index-headers from disk instead of the whole index-header. (default true) -blocks-storage.bucket-store.index-header.verify-on-load If true, verify the checksum of index headers upon loading them (either on startup or lazily when lazy loading is enabled). Setting to true helps detect disk corruption at the cost of slowing down index header loading. - -blocks-storage.bucket-store.max-chunk-pool-bytes uint - [deprecated] Max size - in bytes - of a chunks pool, used to reduce memory allocations. The pool is shared across all tenants. 0 to disable the limit. (default 2147483648) -blocks-storage.bucket-store.max-concurrent int Max number of concurrent queries to execute against the long-term storage. The limit is shared across all tenants. (default 100) -blocks-storage.bucket-store.meta-sync-concurrency int diff --git a/docs/sources/mimir/references/configuration-parameters/index.md b/docs/sources/mimir/references/configuration-parameters/index.md index 4f681bdd262..0b16b836f03 100644 --- a/docs/sources/mimir/references/configuration-parameters/index.md +++ b/docs/sources/mimir/references/configuration-parameters/index.md @@ -3570,19 +3570,6 @@ bucket_store: # CLI flag: -blocks-storage.bucket-store.ignore-blocks-within [ignore_blocks_within: | default = 10h] - # (deprecated) Max size - in bytes - of a chunks pool, used to reduce memory - # allocations. The pool is shared across all tenants. 0 to disable the limit. - # CLI flag: -blocks-storage.bucket-store.max-chunk-pool-bytes - [max_chunk_pool_bytes: | default = 2147483648] - - # (deprecated) Size - in bytes - of the smallest chunks pool bucket. - # CLI flag: -blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes - [chunk_pool_min_bucket_size_bytes: | default = 16000] - - # (deprecated) Size - in bytes - of the largest chunks pool bucket. - # CLI flag: -blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes - [chunk_pool_max_bucket_size_bytes: | default = 50000000] - # (advanced) Max size - in bytes - of the in-memory series hash cache. The # cache is shared across all tenants and it's used only when query sharding is # enabled. diff --git a/operations/compare-helm-with-jsonnet/components/config/kustomization.yaml b/operations/compare-helm-with-jsonnet/components/config/kustomization.yaml index 136cf6bdee1..5600170057b 100644 --- a/operations/compare-helm-with-jsonnet/components/config/kustomization.yaml +++ b/operations/compare-helm-with-jsonnet/components/config/kustomization.yaml @@ -115,8 +115,6 @@ patches: path: /config/store_gateway/sharding_ring/tokens_file_path - op: remove path: /config/store_gateway/sharding_ring/wait_stability_min_duration - - op: remove - path: /config/blocks_storage/bucket_store/max_chunk_pool_bytes - target: kind: MimirConfig diff --git a/operations/helm/charts/mimir-distributed/CHANGELOG.md b/operations/helm/charts/mimir-distributed/CHANGELOG.md index 743cd887ef5..b5ecb94d3a5 100644 --- a/operations/helm/charts/mimir-distributed/CHANGELOG.md +++ b/operations/helm/charts/mimir-distributed/CHANGELOG.md @@ -28,6 +28,7 @@ Entries should include a reference to the Pull Request that introduced the chang ## main / unreleased +* [CHANGE] Remove deprecated configuration parameter `blocks_storage.bucket_store.max_chunk_pool_bytes`. #6673 * [CHANGE] Reduce `-server.grpc-max-concurrent-streams` from 1000 to 500 for ingester and to 100 for all components. #5666 * [CHANGE] Changed default `clusterDomain` from `cluster.local` to `cluster.local.` to reduce the number of DNS lookups made by Mimir. #6389 * [ENHANCEMENT] Update the `rollout-operator` subchart to `0.9.2`. #6022 #6110 #6558 diff --git a/pkg/storage/tsdb/config.go b/pkg/storage/tsdb/config.go index dccde6bc954..e16fce7ad83 100644 --- a/pkg/storage/tsdb/config.go +++ b/pkg/storage/tsdb/config.go @@ -79,12 +79,6 @@ const ( // posting list in the index. Each posting is 4 bytes (uint32) which are the offset of the series in the index file. BytesPerPostingInAPostingList = 4 - // ChunkPoolDefaultMinBucketSize is the default minimum bucket size (bytes) of the chunk pool. - ChunkPoolDefaultMinBucketSize = EstimatedMaxChunkSize // Deprecated. TODO: Remove in Mimir 2.11. - - // ChunkPoolDefaultMaxBucketSize is the default maximum bucket size (bytes) of the chunk pool. - ChunkPoolDefaultMaxBucketSize = 50e6 // Deprecated. TODO: Remove in Mimir 2.11. - // DefaultPostingOffsetInMemorySampling represents default value for --store.index-header-posting-offsets-in-mem-sampling. // 32 value is chosen as it's a good balance for common setups. Sampling that is not too large (too many CPU cycles) and // not too small (too much memory). @@ -102,9 +96,6 @@ const ( DefaultMaxTSDBOpeningConcurrencyOnStartup = 10 - maxChunksBytesPoolFlag = "blocks-storage.bucket-store.max-chunk-pool-bytes" - minBucketSizeBytesFlag = "blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes" - maxBucketSizeBytesFlag = "blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes" seriesSelectionStrategyFlag = "blocks-storage.bucket-store.series-selection-strategy" bucketIndexFlagPrefix = "blocks-storage.bucket-store.bucket-index." ) @@ -388,11 +379,6 @@ type BucketStoreConfig struct { BucketIndex BucketIndexConfig `yaml:"bucket_index"` IgnoreBlocksWithin time.Duration `yaml:"ignore_blocks_within" category:"advanced"` - // Chunk pool. - DeprecatedMaxChunkPoolBytes uint64 `yaml:"max_chunk_pool_bytes" category:"deprecated"` // Deprecated. TODO: Remove in Mimir 2.11. - DeprecatedChunkPoolMinBucketSizeBytes int `yaml:"chunk_pool_min_bucket_size_bytes" category:"deprecated"` // Deprecated. TODO: Remove in Mimir 2.11. - DeprecatedChunkPoolMaxBucketSizeBytes int `yaml:"chunk_pool_max_bucket_size_bytes" category:"deprecated"` // Deprecated. TODO: Remove in Mimir 2.11. - // Series hash cache. SeriesHashCacheMaxBytes uint64 `yaml:"series_hash_cache_max_size_bytes" category:"advanced"` @@ -444,9 +430,6 @@ func (cfg *BucketStoreConfig) RegisterFlags(f *flag.FlagSet) { f.StringVar(&cfg.SyncDir, "blocks-storage.bucket-store.sync-dir", "./tsdb-sync/", "Directory to store synchronized TSDB index headers. This directory is not required to be persisted between restarts, but it's highly recommended in order to improve the store-gateway startup time.") f.DurationVar(&cfg.SyncInterval, "blocks-storage.bucket-store.sync-interval", 15*time.Minute, "How frequently to scan the bucket, or to refresh the bucket index (if enabled), in order to look for changes (new blocks shipped by ingesters and blocks deleted by retention or compaction).") - f.Uint64Var(&cfg.DeprecatedMaxChunkPoolBytes, maxChunksBytesPoolFlag, uint64(2*units.Gibibyte), "Max size - in bytes - of a chunks pool, used to reduce memory allocations. The pool is shared across all tenants. 0 to disable the limit.") - f.IntVar(&cfg.DeprecatedChunkPoolMinBucketSizeBytes, minBucketSizeBytesFlag, ChunkPoolDefaultMinBucketSize, "Size - in bytes - of the smallest chunks pool bucket.") - f.IntVar(&cfg.DeprecatedChunkPoolMaxBucketSizeBytes, maxBucketSizeBytesFlag, ChunkPoolDefaultMaxBucketSize, "Size - in bytes - of the largest chunks pool bucket.") f.Uint64Var(&cfg.SeriesHashCacheMaxBytes, "blocks-storage.bucket-store.series-hash-cache-max-size-bytes", uint64(1*units.Gibibyte), "Max size - in bytes - of the in-memory series hash cache. The cache is shared across all tenants and it's used only when query sharding is enabled.") f.IntVar(&cfg.MaxConcurrent, "blocks-storage.bucket-store.max-concurrent", 100, "Max number of concurrent queries to execute against the long-term storage. The limit is shared across all tenants.") f.IntVar(&cfg.TenantSyncConcurrency, "blocks-storage.bucket-store.tenant-sync-concurrency", 10, "Maximum number of concurrent tenants synching blocks.") @@ -481,15 +464,6 @@ func (cfg *BucketStoreConfig) Validate(logger log.Logger) error { if err := cfg.BucketIndex.Validate(logger); err != nil { return errors.Wrap(err, "bucket-index configuration") } - if cfg.DeprecatedMaxChunkPoolBytes != uint64(2*units.Gibibyte) { - util.WarnDeprecatedConfig(maxChunksBytesPoolFlag, logger) - } - if cfg.DeprecatedChunkPoolMinBucketSizeBytes != ChunkPoolDefaultMinBucketSize { - util.WarnDeprecatedConfig(minBucketSizeBytesFlag, logger) - } - if cfg.DeprecatedChunkPoolMaxBucketSizeBytes != ChunkPoolDefaultMaxBucketSize { - util.WarnDeprecatedConfig(maxBucketSizeBytesFlag, logger) - } if !util.StringsContain(validSeriesSelectionStrategies, cfg.SeriesSelectionStrategyName) { return errors.New("invalid series-selection-strategy, set one of " + strings.Join(validSeriesSelectionStrategies, ", ")) }