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

simplifies jsonnet sharding #3439

Merged
merged 1 commit into from
Mar 4, 2021
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
10 changes: 6 additions & 4 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: if !$._config.queryFrontend.sharded_queries_enabled then 256 else 2048,
max_outstanding_per_tenant: if $._config.queryFrontend.sharded_queries_enabled then 1024 else 256,
},
frontend_worker: {
frontend_address: 'query-frontend.%s.svc.cluster.local:9095' % $._config.namespace,
Expand Down Expand Up @@ -176,9 +176,11 @@
limits_config: {
enforce_metric_name: false,
// align middleware parallelism with shard factor to optimize one-legged sharded queries.
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.
max_query_parallelism: if $._config.queryFrontend.sharded_queries_enabled then
// For a sharding factor of 16 (default), this is 256, or enough for 16 sharded queries.
$._config.queryFrontend.shard_factor * 16
else
16, // default to 16x parallelism
reject_old_samples: true,
reject_old_samples_max_age: '168h',
max_query_length: '12000h', // 500 days
Expand Down
1 change: 1 addition & 0 deletions production/ksonnet/loki/query-frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
container.mixin.readinessProbe.withInitialDelaySeconds(15) +
container.mixin.readinessProbe.withTimeoutSeconds(1) +
$.jaeger_mixin +
// sharded queries may need to do a nonzero amount of aggregation on the frontend.
if $._config.queryFrontend.sharded_queries_enabled then
$.util.resourcesRequests('2', '2Gi') +
$.util.resourcesLimits(null, '6Gi') +
Expand Down