data/<block-ulid>/chunks/000001

Chunks

Compressed sample data of a persisted block lives in numbered segment files under the block's chunks/ directory, each at most 512 MiB. A second segment file (000002) only ever appears once the first crosses that limit, so a small block like this one always has exactly one. The index refers to a chunk with a uint64 reference: the upper 4 bytes select the segment file, the lower 4 bytes are the byte offset inside it.

The payoff of this format is the XOR chunk data: with a steady scrape interval and slowly-changing values, a sample costs a couple of bits instead of 16 bytes. Drill into sample 2 and later below to see single-bit fields.

encoding is a single byte per chunk — that's why XOR and native-histogram chunks coexist in the very same segment file below; there's no separate "histogram block".

Open the interactive byte explorer →

Field notes & invariants

← All TSDB formats