From dfb6cb7f3ca893a831dcd63a58dfa3440b0bde2d Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Mon, 26 Sep 2022 12:21:01 +0200 Subject: [PATCH 1/2] Tweaking defaults for better perfs on higher load --- examples/distributed-loki/1-prerequisites/config.yaml | 8 ++++---- .../2-components/ingester-statefulset.yaml | 2 +- examples/kafka/topic.yaml | 2 +- hack/loki-distributed.sh | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/distributed-loki/1-prerequisites/config.yaml b/examples/distributed-loki/1-prerequisites/config.yaml index 64b3a97..d023e68 100644 --- a/examples/distributed-loki/1-prerequisites/config.yaml +++ b/examples/distributed-loki/1-prerequisites/config.yaml @@ -91,8 +91,8 @@ data: retention_period: 0s limits_config: ingestion_rate_strategy: global - ingestion_rate_mb: 4 - ingestion_burst_size_mb: 6 + ingestion_rate_mb: 20 + ingestion_burst_size_mb: 40 max_label_name_length: 1024 max_label_value_length: 2048 max_label_names_per_series: 30 @@ -116,8 +116,8 @@ data: retention_period: 24h max_cache_freshness_per_query: 5m max_queriers_per_tenant: 0 - per_stream_rate_limit: 3MB - per_stream_rate_limit_burst: 15MB + per_stream_rate_limit: 16MB + per_stream_rate_limit_burst: 40MB max_query_lookback: 0 min_sharding_lookback: 0s split_queries_by_interval: 1m diff --git a/examples/distributed-loki/2-components/ingester-statefulset.yaml b/examples/distributed-loki/2-components/ingester-statefulset.yaml index 5be2416..ce13c75 100644 --- a/examples/distributed-loki/2-components/ingester-statefulset.yaml +++ b/examples/distributed-loki/2-components/ingester-statefulset.yaml @@ -9,7 +9,7 @@ metadata: app.kubernetes.io/part-of: memberlist app.kubernetes.io/version: 2.5.0 spec: - replicas: 2 + replicas: 4 selector: matchLabels: app.kubernetes.io/component: ingester diff --git a/examples/kafka/topic.yaml b/examples/kafka/topic.yaml index 0b303c8..94e3db9 100644 --- a/examples/kafka/topic.yaml +++ b/examples/kafka/topic.yaml @@ -5,5 +5,5 @@ metadata: labels: strimzi.io/cluster: "kafka-cluster" spec: - partitions: 3 + partitions: 24 replicas: 1 diff --git a/hack/loki-distributed.sh b/hack/loki-distributed.sh index 771f5c9..c7b804c 100755 --- a/hack/loki-distributed.sh +++ b/hack/loki-distributed.sh @@ -44,6 +44,10 @@ kubectl apply -n $NAMESPACE -f examples/distributed-loki/3-services/ echo "" echo "Deployment complete" echo "" +echo "Configure FlowCollector Loki with:" +echo " url: 'http://loki-distributed-distributor.netobserv.svc.cluster.local:3100/'" +echo " querierUrl: 'http://loki-distributed-query-frontend.netobserv.svc.cluster.local:3100/'" +echo "" echo "To delete all created Kube resources, run:" echo "kubectl delete -n $NAMESPACE --recursive -f examples/distributed-loki" echo "" From c80508a8974e81223ad39be28b3815145e5046dc Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Mon, 26 Sep 2022 17:59:28 +0200 Subject: [PATCH 2/2] variable namespace in echo --- hack/loki-distributed.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/loki-distributed.sh b/hack/loki-distributed.sh index c7b804c..a3dd4dd 100755 --- a/hack/loki-distributed.sh +++ b/hack/loki-distributed.sh @@ -45,8 +45,8 @@ echo "" echo "Deployment complete" echo "" echo "Configure FlowCollector Loki with:" -echo " url: 'http://loki-distributed-distributor.netobserv.svc.cluster.local:3100/'" -echo " querierUrl: 'http://loki-distributed-query-frontend.netobserv.svc.cluster.local:3100/'" +echo " url: 'http://loki-distributed-distributor.${NAMESPACE}.svc.cluster.local:3100/'" +echo " querierUrl: 'http://loki-distributed-query-frontend.${NAMESPACE}.svc.cluster.local:3100/'" echo "" echo "To delete all created Kube resources, run:" echo "kubectl delete -n $NAMESPACE --recursive -f examples/distributed-loki"