Skip to content

Commit

Permalink
Remove deprecated bucket store flags
Browse files Browse the repository at this point in the history
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 #4996 for more details.
  • Loading branch information
leizor committed Nov 15, 2023
1 parent cc2cbda commit 4eb6c90
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 80 deletions.
33 changes: 0 additions & 33 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions docs/sources/mimir/references/configuration-parameters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3570,19 +3570,6 @@ bucket_store:
# CLI flag: -blocks-storage.bucket-store.ignore-blocks-within
[ignore_blocks_within: <duration> | 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: <int> | 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: <int> | 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: <int> | 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions pkg/storage/tsdb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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."
)
Expand Down Expand Up @@ -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"`

Expand Down Expand Up @@ -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.")
Expand Down Expand Up @@ -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, ", "))
}
Expand Down

0 comments on commit 4eb6c90

Please sign in to comment.