Skip to content

Disable chunk write queue by default, allow user to configure the exact size#10425

Merged
csmarchbanks merged 2 commits intoprometheus:release-2.34from
replay:make_chunk_write_queue_optional
Mar 11, 2022
Merged

Disable chunk write queue by default, allow user to configure the exact size#10425
csmarchbanks merged 2 commits intoprometheus:release-2.34from
replay:make_chunk_write_queue_optional

Conversation

@replay
Copy link
Contributor

@replay replay commented Mar 9, 2022

based on user feedback the chunk write queue had a negative impact on the performance in certain scenarios, so we disable it by default for now. we will try to optimize it further and then maybe enable it by default again in the future.

@replay replay changed the title [WIP] disable chunk write queue if size is 0 [WIP] make it possible to disable the chunk write queue Mar 9, 2022
@replay replay force-pushed the make_chunk_write_queue_optional branch from 7832211 to 7dadd03 Compare March 9, 2022 19:36
@replay replay changed the title [WIP] make it possible to disable the chunk write queue [WIP] disable chunk write queue by default, allow user to configure the exact size Mar 10, 2022
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
@replay replay force-pushed the make_chunk_write_queue_optional branch from 61b47e6 to 80724e5 Compare March 10, 2022 14:22
@replay replay changed the base branch from main to release-2.34 March 10, 2022 14:22
@replay replay changed the title [WIP] disable chunk write queue by default, allow user to configure the exact size Disable chunk write queue by default, allow user to configure the exact size Mar 10, 2022
@replay replay marked this pull request as ready for review March 10, 2022 14:24
@replay replay requested a review from codesome as a code owner March 10, 2022 14:24
@csmarchbanks csmarchbanks mentioned this pull request Mar 10, 2022
Copy link
Member

@codesome codesome left a comment

Choose a reason for hiding this comment

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

LGTM. @csmarchbanks does the flag name looks fine? Should the flag name also include .experimental.?

Also, the release notes can say that we moved this feature into experimental. (it was not released as experimental before)

serverOnlyFlag(a, "storage.tsdb.wal-compression", "Compress the tsdb WAL.").
Hidden().Default("true").BoolVar(&cfg.tsdb.WALCompression)

serverOnlyFlag(a, "storage.tsdb.head-chunks-write-queue-size", "Size of the queue through which head chunks are written, 0 disables the queue completely. Experimental.").
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
serverOnlyFlag(a, "storage.tsdb.head-chunks-write-queue-size", "Size of the queue through which head chunks are written, 0 disables the queue completely. Experimental.").
serverOnlyFlag(a, "storage.tsdb.head-chunks-write-queue-size", "[EXPERIMENTAL] Size of the queue through which head chunks are written to the disk to be m-mapped, 0 disables the queue completely.").

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this should be a feature flag instead of a separate flag? That way it is by default experimental and we are signalling that we hope it becomes the default in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just FYI I copied from here:

a.Flag("scrape.adjust-timestamps", "Adjust scrape timestamps by up to `scrape.timestamp-tolerance` to align them to the intended schedule. See https://github.com/prometheus/prometheus/issues/7846 for more context. Experimental. This flag will be removed in a future release.").

and
a.Flag("scrape.timestamp-tolerance", "Timestamp tolerance. See https://github.com/prometheus/prometheus/issues/7846 for more context. Experimental. This flag will be removed in a future release.").

If there is a better way to signal that something is experimental, maybe we should update these flags too

Copy link
Member

Choose a reason for hiding this comment

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

I am fine with what is there now. Since it also controls the size I think just marking it as experimental similar to the other commands is reasonable.

Copy link
Member

Choose a reason for hiding this comment

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

Can we add to the disk to be m-mapped part. (consider this to be a non-blocking comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we add to the disk to be m-mapped part. (consider this to be a non-blocking comment)

Done: c8b0a56

@csmarchbanks csmarchbanks mentioned this pull request Mar 10, 2022
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
@csmarchbanks csmarchbanks enabled auto-merge (squash) March 11, 2022 16:12
@csmarchbanks csmarchbanks merged commit b025390 into prometheus:release-2.34 Mar 11, 2022
@replay replay deleted the make_chunk_write_queue_optional branch March 11, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants