Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mimir-prometheus to bring back old chunks mapper (without queue) #1159

Merged
merged 2 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ Usage of ./cmd/mimir/mimir:
-blocks-storage.tsdb.head-chunks-write-buffer-size-bytes int
The write buffer size used by the head chunks mapper. Lower values reduce memory utilisation on clusters with a large number of tenants at the cost of increased disk I/O operations. (default 4194304)
-blocks-storage.tsdb.head-chunks-write-queue-size int
The size of the write queue used by the head chunks mapper. Lower values reduce memory utilisation at the cost of potentially higher ingest latency. (default 1000000)
[experimental] The size of the write queue used by the head chunks mapper. Lower values reduce memory utilisation at the cost of potentially higher ingest latency. Value of 0 switches chunks mapper to implementation without a queue.
-blocks-storage.tsdb.head-compaction-concurrency int
Maximum number of tenants concurrently compacting TSDB head into a new block (default 5)
-blocks-storage.tsdb.head-compaction-idle-timeout duration
Expand Down
7 changes: 4 additions & 3 deletions docs/sources/architecture/querier.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,12 @@ blocks_storage:
# CLI flag: -blocks-storage.tsdb.memory-snapshot-on-shutdown
[memory_snapshot_on_shutdown: <boolean> | default = false]

# (advanced) The size of the write queue used by the head chunks mapper.
# (experimental) The size of the write queue used by the head chunks mapper.
# Lower values reduce memory utilisation at the cost of potentially higher
# ingest latency.
# ingest latency. Value of 0 switches chunks mapper to implementation
# without a queue.
# CLI flag: -blocks-storage.tsdb.head-chunks-write-queue-size
[head_chunks_write_queue_size: <int> | default = 1000000]
[head_chunks_write_queue_size: <int> | default = 0]

# (advanced) Enables TSDB isolation feature. Disabling may improve
# performance.
Expand Down
7 changes: 4 additions & 3 deletions docs/sources/architecture/store-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,12 @@ blocks_storage:
# CLI flag: -blocks-storage.tsdb.memory-snapshot-on-shutdown
[memory_snapshot_on_shutdown: <boolean> | default = false]

# (advanced) The size of the write queue used by the head chunks mapper.
# (experimental) The size of the write queue used by the head chunks mapper.
# Lower values reduce memory utilisation at the cost of potentially higher
# ingest latency.
# ingest latency. Value of 0 switches chunks mapper to implementation
# without a queue.
# CLI flag: -blocks-storage.tsdb.head-chunks-write-queue-size
[head_chunks_write_queue_size: <int> | default = 1000000]
[head_chunks_write_queue_size: <int> | default = 0]

# (advanced) Enables TSDB isolation feature. Disabling may improve
# performance.
Expand Down
4 changes: 3 additions & 1 deletion docs/sources/configuration/about-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ Currently experimental features are:
- `-compactor.ring.heartbeat-period=0`
- `-store-gateway.sharding-ring.heartbeat-period=0`
- Exclude ingesters running in specific zones (`-distributor.excluded-zones`)
- Ingester: Add variance to chunks end time to spread writing across time (`-blocks-storage.tsdb.head-chunks-end-time-variance`)
- Ingester
- Add variance to chunks end time to spread writing across time (`-blocks-storage.tsdb.head-chunks-end-time-variance`)
- Using queue and asynchronous chunks disk mapper (`-blocks-storage.tsdb.head-chunks-write-queue-size`)
Original file line number Diff line number Diff line change
Expand Up @@ -3251,11 +3251,12 @@ tsdb:
# CLI flag: -blocks-storage.tsdb.memory-snapshot-on-shutdown
[memory_snapshot_on_shutdown: <boolean> | default = false]

# (advanced) The size of the write queue used by the head chunks mapper. Lower
# values reduce memory utilisation at the cost of potentially higher ingest
# latency.
# (experimental) The size of the write queue used by the head chunks mapper.
# Lower values reduce memory utilisation at the cost of potentially higher
# ingest latency. Value of 0 switches chunks mapper to implementation without
# a queue.
# CLI flag: -blocks-storage.tsdb.head-chunks-write-queue-size
[head_chunks_write_queue_size: <int> | default = 1000000]
[head_chunks_write_queue_size: <int> | default = 0]

# (advanced) Enables TSDB isolation feature. Disabling may improve
# performance.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110
replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab

// Using a fork of Prometheus while we work on querysharding to avoid a dependency on the upstream.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20220124124958-644605deb599
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20220210133335-cd86e92b7450

// Pin hashicorp depencencies since the Prometheus fork, go mod tries to update them.
replace github.com/hashicorp/go-immutable-radix => github.com/hashicorp/go-immutable-radix v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,8 @@ github.com/grafana/dskit v0.0.0-20220210081316-a0b153f4289d/go.mod h1:Q9WmQ9cVkr
github.com/grafana/e2e v0.1.0 h1:nThd0U0TjUqyOOupSb+qDd4BOdhqwhR/oYbjoqiMlZk=
github.com/grafana/e2e v0.1.0/go.mod h1:+26VJWpczg2OU3D0537acnHSHzhJORpxOs6F+M27tZo=
github.com/grafana/memberlist v0.2.5-0.20211201083710-c7bc8e9df94b/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20220124124958-644605deb599 h1:vFQ6CQRhIv+i+18GJtxSIjGsEK8k7Rqu8s3m1ZGmYNU=
github.com/grafana/mimir-prometheus v0.0.0-20220124124958-644605deb599/go.mod h1:6K+MGuCdYASOcOEKusiGUeYeRoobrW/26smN9OCXb0M=
github.com/grafana/mimir-prometheus v0.0.0-20220210133335-cd86e92b7450 h1:vkkcvUkUe3T6611IvkB/dfQ6AvNeegQ3CM8Eq2FDvPs=
github.com/grafana/mimir-prometheus v0.0.0-20220210133335-cd86e92b7450/go.mod h1:6K+MGuCdYASOcOEKusiGUeYeRoobrW/26smN9OCXb0M=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/tsdb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ type TSDBConfig struct {
FlushBlocksOnShutdown bool `yaml:"flush_blocks_on_shutdown" category:"advanced"`
CloseIdleTSDBTimeout time.Duration `yaml:"close_idle_tsdb_timeout" category:"advanced"`
MemorySnapshotOnShutdown bool `yaml:"memory_snapshot_on_shutdown" category:"advanced"`
HeadChunksWriteQueueSize int `yaml:"head_chunks_write_queue_size" category:"advanced"`
HeadChunksWriteQueueSize int `yaml:"head_chunks_write_queue_size" category:"experimental"`
IsolationEnabled bool `yaml:"isolation_enabled" category:"advanced"`

// Series hash cache.
Expand Down Expand Up @@ -197,7 +197,7 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) {
f.BoolVar(&cfg.FlushBlocksOnShutdown, "blocks-storage.tsdb.flush-blocks-on-shutdown", false, "True to flush blocks to storage on shutdown. If false, incomplete blocks will be reused after restart.")
f.DurationVar(&cfg.CloseIdleTSDBTimeout, "blocks-storage.tsdb.close-idle-tsdb-timeout", 13*time.Hour, "If TSDB has not received any data for this duration, and all blocks from TSDB have been shipped, TSDB is closed and deleted from local disk. If set to positive value, this value should be equal or higher than -querier.query-ingesters-within flag to make sure that TSDB is not closed prematurely, which could cause partial query results. 0 or negative value disables closing of idle TSDB.")
f.BoolVar(&cfg.MemorySnapshotOnShutdown, "blocks-storage.tsdb.memory-snapshot-on-shutdown", false, "True to enable snapshotting of in-memory TSDB data on disk when shutting down.")
f.IntVar(&cfg.HeadChunksWriteQueueSize, "blocks-storage.tsdb.head-chunks-write-queue-size", 1000000, "The size of the write queue used by the head chunks mapper. Lower values reduce memory utilisation at the cost of potentially higher ingest latency.")
f.IntVar(&cfg.HeadChunksWriteQueueSize, "blocks-storage.tsdb.head-chunks-write-queue-size", 0, "The size of the write queue used by the head chunks mapper. Lower values reduce memory utilisation at the cost of potentially higher ingest latency. Value of 0 switches chunks mapper to implementation without a queue.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mark it experimental and list it among experimental files in the doc page too, please?

f.BoolVar(&cfg.IsolationEnabled, "blocks-storage.tsdb.isolation-enabled", true, "Enables TSDB isolation feature. Disabling may improve performance.")
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading