Skip to content

Commit

Permalink
doc(best-practices): Update default value of max_chunk_age. (grafan…
Browse files Browse the repository at this point in the history
  • Loading branch information
kavirajk authored Mar 2, 2023
1 parent 2dcaba3 commit 3714557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sources/best-practices/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ It's also worth noting that the batching nature of the Loki push API can lead to

Using `chunk_target_size` instructs Loki to try to fill all chunks to a target _compressed_ size of 1.5MB. These larger chunks are more efficient for Loki to process.

Other configuration variables affect how full a chunk can get. Loki has a default `max_chunk_age` of 1h and `chunk_idle_period` of 30m to limit the amount of memory used as well as the exposure of lost logs if the process crashes.
Other configuration variables affect how full a chunk can get. Loki has a default `max_chunk_age` of 2h and `chunk_idle_period` of 30m to limit the amount of memory used as well as the exposure of lost logs if the process crashes.

Depending on the compression used (we have been using snappy which has less compressibility but faster performance), you need 5-10x or 7.5-10MB of raw log data to fill a 1.5MB chunk. Remembering that a chunk is per stream, the more streams you break up your log files into, the more chunks that sit in memory, and the higher likelihood they get flushed by hitting one of those timeouts mentioned above before they are filled.

Expand Down

0 comments on commit 3714557

Please sign in to comment.