Skip to content

Commit

Permalink
template query_range, template cache writeback settings, testing a si…
Browse files Browse the repository at this point in the history
…ngle binary file

Signed-off-by: Edward Welch <edward.welch@grafana.com>
  • Loading branch information
slim-bean committed Apr 7, 2024
1 parent 7b4caa1 commit 3580c00
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
82 changes: 82 additions & 0 deletions production/helm/loki/single-binary-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
loki:
commonConfig:
replication_factor: 1
image:
tag: "3.0.0-rc.1-amd64-45ca2fa51"

schemaConfig:
configs:
- from: 2024-04-01
store: tsdb
object_store: s3
schema: v13
index:
prefix: loki_index_
period: 24h
ingester:
chunk_encoding: snappy
tracing:
enabled: true
querier:
# Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing
max_concurrent: 2

gateway:
ingress:
enabled: true
hosts:
- host: FIXME
paths:
- path: /
pathType: Prefix

deploymentMode: SingleBinary
singleBinary:
replicas: 1
resources:
limits:
cpu: 3
memory: 6Gi
requests:
cpu: 2
memory: 2Gi
extraEnv:
# Keep a little bit lower than memory limits
- name: GOMEMLIMIT
value: 5500MiB

chunksCache:
# default is 500MB, with limited memory keep this smaller
writebackSizeLimit: 50MB

# Enable minio for storage
minio:
enabled: true

# Zero out replica counts of other deployment modes
backend:
replicas: 0
read:
replicas: 0
write:
replicas: 0

ingester:
replicas: 0
querier:
replicas: 0
queryFrontend:
replicas: 0
queryScheduler:
replicas: 0
distributor:
replicas: 0
compactor:
replicas: 0
indexGateway:
replicas: 0
bloomCompactor:
replicas: 0
bloomGateway:
replicas: 0
25 changes: 25 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ loki:
chunk_store_config:
chunk_cache_config:
default_validity: {{ .defaultValidity }}
background:
writeback_goroutines: {{ .writebackParallelism }}
writeback_buffer: {{ .writebackBuffer }}
writeback_size_limit: {{ .writebackSizeLimit }}
memcached:
batch_size: {{ .batchSize }}
parallelism: {{ .parallelism }}
Expand Down Expand Up @@ -209,12 +213,19 @@ loki:
query_range:
align_queries_with_step: true
{{- with .Values.loki.query_range }}
{{- tpl (. | toYaml) $ | nindent 4 }}
{{- end }}
{{- if .Values.resultsCache.enabled }}
{{- with .Values.resultsCache }}
cache_results: true
results_cache:
cache:
default_validity: {{ .defaultValidity }}
background:
writeback_goroutines: {{ .writebackParallelism }}
writeback_buffer: {{ .writebackBuffer }}
writeback_size_limit: {{ .writebackSizeLimit }}
memcached_client:
consistent_hash: true
addresses: dnssrvnoa+_memcached-client._tcp.{{ template "loki.fullname" $ }}-results-cache.{{ $.Release.Namespace }}.svc
Expand Down Expand Up @@ -396,6 +407,8 @@ loki:
# -- Optional analytics configuration
analytics: {}
# -- Optional querier configuration
query_range: {}
# -- Optional querier configuration
querier: {}
# -- Optional ingester configuration
ingester: {}
Expand Down Expand Up @@ -2868,6 +2881,12 @@ resultsCache:
maxItemMemory: 5
# -- Maximum number of connections allowed
connectionLimit: 16384
# -- Max memory to use for cache write back
writebackSizeLimit: 500MB
# -- Max number of objects to use for cache write back
writebackBuffer: 500000
# -- Number of parallel threads for cache write back
writebackParallelism: 1
# -- Extra init containers for results-cache pods
initContainers: []
# -- Annotations for the results-cache pods
Expand Down Expand Up @@ -2951,6 +2970,12 @@ chunksCache:
maxItemMemory: 5
# -- Maximum number of connections allowed
connectionLimit: 16384
# -- Max memory to use for cache write back
writebackSizeLimit: 500MB
# -- Max number of objects to use for cache write back
writebackBuffer: 500000
# -- Number of parallel threads for cache write back
writebackParallelism: 1
# -- Extra init containers for chunks-cache pods
initContainers: []
# -- Annotations for the chunks-cache pods
Expand Down

0 comments on commit 3580c00

Please sign in to comment.