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

Jsonnet: fix ruler-querier autoscaling target utilization #5682

Merged
merged 1 commit into from
Aug 4, 2023
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
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@
* [ENHANCEMENT] Allow to remove an entry from the configured environment variable for a given component, setting the environment value to `null` in the `*_env_map` objects (e.g. `store_gateway_env_map+:: { 'field': null}`). #5599
* [ENHANCEMENT] Allow overriding the default number of replicas for `etcd`.
* [ENHANCEMENT] Memcached: reduce memory request for results, chunks and metadata caches. The requested memory is 5% greater than the configured memcached max cache size. #5661
* [ENHANCEMENT] Autoscaling: Add the following configuration options to fine tune autoscaler target utilization: #5679
* [ENHANCEMENT] Autoscaling: Add the following configuration options to fine tune autoscaler target utilization: #5679 #5682
* `autoscaling_querier_target_utilization` (defaults to `0.75`)
* `autoscaling_mimir_read_target_utilization` (defaults to `0.75`)
* `autoscaling_ruler_querier_cpu_target_utilization` (defaults to `1`)
* `autoscaling_ruler_querier_memory_target_utilization` (defaults to `1`)
* `autoscaling_distributor_memory_target_utilization` (defaults to `1`)
* `autoscaling_ruler_cpu_target_utilization` (defaults to `1`)
* `autoscaling_query_frontend_cpu_target_utilization` (defaults to `1`)
Expand Down
6 changes: 2 additions & 4 deletions operations/mimir/autoscaling.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
autoscaling_ruler_querier_min_replicas: error 'you must set autoscaling_ruler_querier_min_replicas in the _config',
autoscaling_ruler_querier_max_replicas: error 'you must set autoscaling_ruler_querier_max_replicas in the _config',
autoscaling_ruler_querier_cpu_target_utilization: 1,
autoscaling_ruler_querier_memory_target_utilization: 1,

autoscaling_distributor_enabled: false,
autoscaling_distributor_min_replicas: error 'you must set autoscaling_distributor_min_replicas in the _config',
Expand Down Expand Up @@ -284,7 +283,7 @@

// newRulerQuerierScaledObject will create a scaled object for the ruler-querier component with the given name.
// `weight` param works in the same way as in `newQuerierScaledObject`, see docs there.
newRulerQuerierScaledObject(name, querier_cpu_requests, min_replicas, max_replicas, cpu_target_utilization, memory_target_utilization, weight=1):: self.newScaledObject(name, $._config.namespace, {
newRulerQuerierScaledObject(name, querier_cpu_requests, min_replicas, max_replicas, cpu_target_utilization, weight=1):: self.newScaledObject(name, $._config.namespace, {
min_replica_count: replicasWithWeight(min_replicas, weight),
max_replica_count: replicasWithWeight(max_replicas, weight),

Expand All @@ -298,7 +297,7 @@
query: metricWithWeight('max_over_time(sum(rate(container_cpu_usage_seconds_total{container="%s",namespace="%s"}[5m]))[15m:]) * 1000' % [name, $._config.namespace], weight),

// threshold is expected to be a string.
threshold: std.toString(cpuToMilliCPUInt(querier_cpu_requests)),
threshold: std.toString(cpuToMilliCPUInt(querier_cpu_requests) * cpu_target_utilization),
},
],
}),
Expand All @@ -310,7 +309,6 @@
min_replicas=$._config.autoscaling_ruler_querier_min_replicas,
max_replicas=$._config.autoscaling_ruler_querier_max_replicas,
cpu_target_utilization=$._config.autoscaling_ruler_querier_cpu_target_utilization,
memory_target_utilization=$._config.autoscaling_ruler_querier_memory_target_utilization,
),

ruler_querier_deployment: overrideSuperIfExists(
Expand Down
Loading