Skip to main content
QUICK REVIEW

[Paper Review] The Design, Implementation, and Deployment of a System to Transparently Compress Hundreds of Petabytes of Image Files for a File-Storage Service

Daniel Reiter Horn, Ken Elkabany|arXiv (Cornell University)|Mar 25, 2017
Advanced Data Storage TechnologiesComputer Science4 citations
TL;DR

Lepton is a lossless compression system that reduces JPEG image sizes by 23% on average by replacing baseline Huffman coding with a custom arithmetic coding scheme, enabling streaming, low-latency decompression and transparent integration into Dropbox’s file-storage backend. It has compressed over 203 PiB of user JPEGs, saving more than 46 PiB, with production deployment achieving 9x faster decoding than prior tools while maintaining full round-trip transparency and fault tolerance.

ABSTRACT

We report the design, implementation, and deployment of Lepton, a fault-tolerant system that losslessly compresses JPEG images to 77% of their original size on average. Lepton replaces the lowest layer of baseline JPEG compression-a Huffman code-with a parallelized arithmetic code, so that the exact bytes of the original JPEG file can be recovered quickly. Lepton matches the compression efficiency of the best prior work, while decoding more than nine times faster and in a streaming manner. Lepton has been released as open-source software and has been deployed for a year on the Dropbox file-storage backend. As of February 2017, it had compressed more than 203 PiB of user JPEG files, saving more than 46 PiB.

Motivation & Objective

  • To reduce the storage footprint of JPEG images in a large-scale file-storage system without modifying user data or requiring client-side changes.
  • To achieve high compression efficiency comparable to the best prior work while drastically improving decompression speed and enabling streaming, low-latency decoding.
  • To ensure round-trip transparency, allowing exact recovery of original JPEG bytes even after software updates or on malformed inputs.
  • To enable independent, random access to any substring of a compressed JPEG file, critical for distributed storage systems that shard files across servers.
  • To deploy the system at scale with strong fault tolerance, security hardening, and minimal resource usage on backend servers.

Proposed method

  • Replacing the Huffman coding layer in baseline JPEGs with a custom arithmetic coding scheme tuned to a large corpus of real-world Dropbox JPEGs.
  • Designing a streaming, multithreaded decompression pipeline using 'Huffman handover words' to enable early output and parallel decoding.
  • Implementing a restricted execution environment with limited system calls (read, write, exit, sigreturn) and pre-allocated memory to prevent security vulnerabilities from untrusted input.
  • Using a row-wise processing model to limit memory usage, avoiding full file loading into RAM during decompression.
  • Introducing a deterministic, versioned format with a 'qualified build' system to ensure compatibility across software updates.
  • Deploying Lepton as a transparent layer in the file-storage stack, with automatic compression on upload and gradual re-compression of existing files.

Experimental results

Research questions

  • RQ1Can a format-specific, lossless compression system achieve both high compression efficiency and sub-millisecond decompression latency in a distributed, sharded storage environment?
  • RQ2How can a lossless image compression system be made fully transparent to clients while ensuring deterministic, bit-identical reconstruction of original JPEGs across software updates?
  • RQ3What architectural and implementation techniques are required to enable streaming, low-latency decompression of arbitrary file substrings in a distributed backend?
  • RQ4How can security and memory safety be ensured when processing untrusted, user-generated JPEGs in a high-throughput, production-scale system?
  • RQ5What operational challenges arise when deploying a new compression system at scale across hundreds of petabytes of user data?

Key findings

  • Lepton achieved an average 23% reduction in JPEG file size across 150 billion user files, saving over 46 PiB of storage from an initial 203 PiB of input.
  • Decompression with Lepton was more than nine times faster than prior tools like PackJPG, with significantly improved time-to-first-byte and time-to-last-byte.
  • The system successfully enabled streaming, multithreaded decompression by introducing 'Huffman handover words' that allow early output and parallel processing.
  • Despite rigorous design, a human error in deployment led to a configuration misconfiguration that caused 2 hours of degraded service and required re-encoding of 18 files, highlighting operational risks.
  • The system maintained full transparency and correctness over a year of production use, with no instances of failed decompression or data loss.
  • The deployment process revealed critical gaps in documentation, onboarding, and configuration management, prompting changes to prevent future incidents.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.