Skip to content

Commit

Permalink
Libsonnet/better sharding parallelism defaults (#3357)
Browse files Browse the repository at this point in the history
* increases read path parallelism limits to be in line with global parallelism controls.

* noop: shard-factor -> 16 when sharding disabled

* 2048 sharded queue size
  • Loading branch information
owen-d authored Feb 22, 2021
1 parent 4c8967c commit 1036f00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions production/ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
frontend: {
compress_responses: true,
log_queries_longer_than: '5s',
max_outstanding_per_tenant: 300,
max_outstanding_per_tenant: if !$._config.queryFrontend.sharded_queries_enabled then 256 else 2048,
},
frontend_worker: {
frontend_address: 'query-frontend.%s.svc.cluster.local:9095' % $._config.namespace,
Expand Down Expand Up @@ -176,7 +176,9 @@
limits_config: {
enforce_metric_name: false,
// align middleware parallelism with shard factor to optimize one-legged sharded queries.
max_query_parallelism: $._config.queryFrontend.shard_factor,
max_query_parallelism: if !$._config.queryFrontend.sharded_queries_enabled then
16 // default to 16x parallelism
else $._config.queryFrontend.shard_factor << 4, // For a sharding factor of 16 (default), this is 256, or enough for 16 sharded queries.
reject_old_samples: true,
reject_old_samples_max_age: '168h',
max_query_length: '12000h', // 500 days
Expand Down

0 comments on commit 1036f00

Please sign in to comment.