prometheus/tsdb/chunks
Justin Lei 8ef7dfdeeb
Add a chunk size limit in bytes (#12054)
Add a chunk size limit in bytes

This creates a hard cap for XOR chunks of 1024 bytes.

The limit for histogram chunk is also 1024 bytes, but it is a soft limit as a histogram has a dynamic size, and even a single one could be larger than 1024 bytes.

This also avoids cutting new histogram chunks if the existing chunk has fewer than 10 histograms yet. In that way, we are accepting "jumbo chunks" in order to have at least 10 histograms in a chunk, allowing compression to kick in.

Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-08-24 15:21:17 +02:00
..
chunk_write_queue.go Fix: getting rid of EncOOOXOR chunk encoding (#12111) 2023-03-16 15:53:47 +05:30
chunk_write_queue_test.go Fix: getting rid of EncOOOXOR chunk encoding (#12111) 2023-03-16 15:53:47 +05:30
chunks.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00
chunks_test.go Add out-of-order sample support to the TSDB (#11075) 2022-09-20 22:35:50 +05:30
head_chunks.go Fix race condition in ChunkDiskMapper.Truncate() (#12500) 2023-06-30 18:29:59 +05:30
head_chunks_other.go tsdb/chunks: preallocate at least some space on non-Windows systems (#9581) 2021-11-09 13:47:00 +05:30
head_chunks_test.go Fix race condition in ChunkDiskMapper.Truncate() (#12500) 2023-06-30 18:29:59 +05:30
head_chunks_windows.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
queue.go Reduce chunk write queue memory usage 2 (#10874) 2022-06-29 17:51:27 +05:30
queue_test.go Reduce chunk write queue memory usage 2 (#10874) 2022-06-29 17:51:27 +05:30
samples.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00