Ankit Patel
WritingPapersLabsAboutContact
Paper Reviews··1 min read·474 views

Gorilla: Compressing Telemetry by Delta-of-Delta

Facebook Gorilla · Pelkonen et al., VLDB 2015

One reading takes 128 bits uncompressed and about 11 after Gorilla's encoding

A host reports metrics at 1000, 1010, 1020 and 1031 milliseconds. The gaps between points are 10, 10 and 11, and the changes in those gaps are 0 and 1.

That second difference is the core of timestamp compression in Facebook's Gorilla paper (Pelkonen et al., VLDB 2015). Steady collection intervals produce long runs of zeros, and minor timing jitter leaves tiny residuals that pack into a few bits after the block header.

Gorilla calls this delta-of-delta encoding. Instead of storing each timestamp as an independent 64-bit integer, it writes a single bit when the interval repeats and variable-length tags when timing drifts.

Floating-point metric values get a parallel treatment using XOR against the previous sample. Identical consecutive readings cost one bit. When a value changes, Gorilla reuses the leading-zero and trailing-zero window of the XOR result when the changed bits fall inside the prior range. The compression is completely lossless.

Both schemes bet on neighbor similarity rather than assuming all telemetry is small. Steady intervals and flat gauges compress dramatically. Irregular arrivals widen the timestamp deltas, and noisy floating-point values scatter changed bits across the mantissa even when the numeric shift looks small on a chart.

Sizing a monitoring cluster from a paper's average bytes-per-point misses the regime that matters most. Benchmark compression across both quiet hours and active incidents, when scrape jitter rises and counters jump at once.

What stands out to me is how Gorilla separates encoding fidelity from write durability. Built for recent operational dashboards, it favors write availability over strict persistence during node failures, reminding us that lossless bit compression and lossless event storage are two very different guarantees.

Continue in Paper Reviews