Skip to main content

One post tagged with "memory-management"

View All Tags

War of the Allocators

· 9 min read
Bikram Singh
Software Engineer @ Meta
Orri Erling
Software Engineer @ Meta
Xiaoxuan Meng
Software Engineer @ Meta
Kevin Wilfong
Software Engineer @ Meta

This post shares an allocator analysis conducted in late 2024 while migrating internal Presto clusters to Velox execution through Prestissimo. Although the decision described here was made at that time, the experiments and trade-offs remain relevant to Velox users choosing between jemalloc and Velox's mmap-based allocator.

Objective

We conducted this investigation to determine which allocator to use as we migrated Presto workloads to Velox through Prestissimo. We compared jemalloc with Velox's custom mmap-based allocator, focusing on performance, memory fragmentation, RSS control, and behavior under high concurrency. This evaluation considered the trade-offs between leveraging the maturity, integration, and support of jemalloc, versus investing significant engineering bandwidth in developing a robust custom allocator that could match the reliability and debugging capabilities of jemalloc.