Skip to content

Conversation

dimitarvdimitrov
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov commented Mar 21, 2025

In Mimir's ruler we experimented with setting a higher value for the batch size. A 4x increase in batch size decreased the time to process a single notification by about 2x. This reduces the processing time of the notifications queue and increases the throughput of the queue, which helps when there is a surge in alerts.

edit 2025-03-25:

We ran this in GC for a while and the results after implementing batch size of 256 are:

  • No dropped notifications during "Deployment Updated" alert spikes
  • Throughput significantly improved
  • Time per notification reduced by ~30%
425463753-c82c5b45-d2ad-44df-bd6c-98ad88af3c0c 425463752-498aff74-7128-442b-bf76-17f6e7bcc73c

In Mimir we experimented with setting a higher value for the batch size.
A 4x increase in batch size decreased the time to process a single notification by about 2x.
This reduces the processing time of the notifications queue and increases the throughput of the queue.

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM, but please take a look at my comments.

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov force-pushed the dimitar/batch-size-confiurable branch from c0c6748 to 931f935 Compare March 24, 2025 09:48
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks!

@gotjosh gotjosh enabled auto-merge (squash) March 24, 2025 14:22
@gotjosh gotjosh merged commit bd5b2ea into prometheus:main Mar 24, 2025
27 checks passed
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.

2 participants