Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 9 min read Case study easyNovice

Composable data management at Meta

Meta has been decomposing its many monolithic data engines (ETL, interactive, streaming, ML preprocessing) into reusable components: language frontend, IR, optimizer, execution library and runtime. Velox, its open-source engine- and dialect-agnostic execution library, is the centerpiece. It uses columnar/vectorized execution, compressed execution via encodings, lazy materialization and adaptive filter/join ordering, and has delivered 3-10x efficiency gains in Presto (Prestissimo) and about 3x in Spark via Gluten. To restore interoperability, Meta upstreamed StringView, ListView and Run-End-Encoding into Apache Arrow. Next steps are the Nimble file format for wide AI/ML tables and hardware-accelerated data systems.

Assumes: query execution enginescolumnar data formats

Related posts

  • Introducing Velox: An open source unified execution engine

    Meta Engineering hardMaster

    Velox is Meta's open source C++ execution engine that unifies the data-plane components (expression evaluation, aggregation, joins, sorting, I/O, resource management) shared by engines like Presto, Spark and PyTorch's TorchArrow. It takes an optimized plan as input and runs it on a single host. It uses an Arrow-compatible columnar vector layout with multiple encodings, vectorized expression evaluation with dictionary peeling and common subexpression elimination, and runtime optimizations such as dynamic filter pushdown and adaptive prefetching. Replacing Presto Java workers with the Velox-based Prestissimo gave up to an order of magnitude speedup on CPU-bound TPC-H queries and 6-7x average speedups on production interactive workloads. Spark integrates Velox through Intel's Gluten via JNI using Arrow and Substrait.

  • Aligning Velox and Apache Arrow: Towards composable data management

    Meta Engineering hardMaster

    Apache Arrow 15 adds three columnar layouts derived from Meta's Velox Vectors: StringView, ListView and Run-End-Encoding (REE). The goal is zero-copy interchange between Velox and the wider Arrow ecosystem. StringView uses 16-byte view objects that inline strings up to 12 bytes and keep a 4-byte prefix otherwise, which enables fail-fast comparisons, zero-copy trim/substr and out-of-order writes. ListView stores both lengths and offsets so containers can be written out of order for vectorized conditionals and sliced zero-copy. REE stores run end offsets rather than run lengths for better random access, and it also covers constant encoding.

  • A modern data stack for startups

    incident.io mediumAdept

    A small startup data stack built in two weeks: Fivetran (plus Stitch for connectors Fivetran lacks, like the Close CRM) extracts data into BigQuery, dbt transforms it, and Metabase lets non-engineers explore it without SQL. The dbt project skips 'base' models and goes straight to staging tables, producing dimension and fact marts only when joining across sources or doing complex transforms, which keeps schema maintenance low. Other practical details: Fivetran's xmin-cursor fallback for Heroku Postgres without logical replication, per-engineer BigQuery dev datasets, and using dbt-metabase to turn dbt relationship tests into Metabase foreign keys so joins auto-fill.

  • How we extended Apache DataFusion to execute one query across many machines

    Datadog Engineering hardMaster

    Datadog built Distributed DataFusion, an open source Rust framework that extends Apache DataFusion's physical execution model so a single interactive query can run across many machines while keeping latency roughly flat as data grows. It reuses DataFusion's partitioning model and adds stages, tasks and network nodes such as NetworkCoalesce and NetworkShuffle. With these it distributes sorts, hash-partitioned aggregations, partitioned and broadcast joins, unions and tree-reduce aggregations, all as streaming execution without intermediate materialization. Datadog chose to extend DataFusion over adopting ClickHouse, Spark, Ballista or Trino because it needed extensibility, low latency, and Arrow/Substrait integration. Some heavy production queries now run up to 10× faster at the same total cost, and the planner keeps small queries on one node to avoid network, serialization and coordination overhead.

  • ClickHouse and Parquet: A foundation for fast Lakehouse analytics

    ClickHouse mediumAdept

    ClickHouse queries Parquet files directly, without ingestion, through a format-specific reader that currently parses via Arrow and then converts into ClickHouse's in-memory format. Performance rests on two things: parallelism and I/O reduction. Parallelism comes from prefetch threads, parsing threads, file streams and processing lanes. File streams are computed as min(max_threads, num_files), and parsing threads per file as max(max_parsing_threads / num_files, 1), with EXPLAIN Pipeline examples showing the resulting plans. A third native reader, "Yet Another Parquet Reader", is in development to drop the Arrow layer and improve parallelism and I/O efficiency, and the current reader serves as the benchmark baseline.

The quest for software engineering knowledge.

Look:
Layout: