Size the cluster

This is documentation for the next version of Loki. For the latest stable release, go to the latest version.

Open source RSS

Size the cluster

This section is a guide to size base resource needs of a Loki cluster.

Based on the expected ingestion volume, Loki clusters can be categorised into three tiers. Recommendations below are based on p90 resource utilisations of the relevant components. Each tab represents a different tier. Please use this document as a rough guide to specify CPU and Memory requests in your deployment. This is only documented for microservices/distributed mode at this time.

Query resource needs can greatly vary with usage patterns and correct configurations. General notes on Query Performance:

  • The rule of thumb is to run as small and as many queriers as possible. Unoptimised queries can easily require 10x of the suggested querier resources below in all tiers. Running horizontal autoscaling will be most cost effective solution to meet the demand.
  • Use this blog post to adopt best practices for optimised query performance.
  • Parallel-querier and related components can be sized the same along with queriers to start, depending on how much Loki rules are used.
  • Large Loki clusters benefit from a disk based caching solution, memcached-extstore. Please see the detailed blog post and read more about memcached/nvm-caching here.
  • If you’re running a cluster that handles less than 30TB/day (~1PB/month) ingestion, we do not recommend configuring memcached-extstore. The additional operational complexity does not justify the savings.
ComponentCPU RequestMemory Request (Gi)Base ReplicasTotal CPU ReqTotal Mem Req (Gi)
Ingester2461236
Distributor20.5482
Index gateway0.52428
Querier11101010
Query-frontend12224
Query-scheduler10.5221
Compactor2101 (Singleton)210
ComponentCPU RequestMemory Request (Gi)Base ReplicasTotal CPU ReqTotal Mem Req (Gi)
Ingester2690180540
Distributor21408040
Index gateway0.5410540
Querier1.52100150200
Query-frontend128816
Query-scheduler10.5221
Compactor6201 (Singleton)620
ComponentCPU RequestMemory Request (Gi)Base ReplicasTotal CPU ReqTotal Mem Req (Gi)
Ingester481506001200
Distributor21100200100
Index gateway14202080
Querier1.53250375750
Query-frontend14161664
Query-scheduler20.5241
Compactor6401 (Singleton)640

Instance Types

These are the node types we suggest from various cloud providers. Please see the relevant specifications in the provider’s documentation.

  • For AWS any General Purpose machine available in your region that belongs to M6 instance family and above for Intel chips and T2 machine family and above for ARM chips.
  • For GCP any General Purpose machine available in your region that belongs to to E2 instance family and above.
  • For memcached-extstore nodes we suggest storage optimised instances that can has NVMe storage so that the additional disk space is utilized.