Jason Evans

Tick Tock, malloc Needs a Clock 02-27-2015 @ 11:10 - 12:10

Jason Evans — Jason Evans is a systems software engineer who earned a BS in computer science and a PhD in bioinformatics from the University of Idaho, during which he developed his interests in operating systems and programming languages, respectively. In 2005 he salvaged jemalloc from a programming language runtime he was developing and integrated it with the FreeBSD operating system. Since then he has adapted jemalloc for use in Mozilla's Firefox and Facebook's back end infrastructure software (especially HHVM), all the while carefully preserving its utility as a general purpose allocator. As jemalloc adoption spreads and other developers contribute significant new functionality, he strives to make it simpler and ever faster.

The jemalloc memory allocator is well known for low fragmentation and high concurrency, yet those two strengths sabotage each other. Eager free memory coalescence facilitates fragmentation avoidance, but concurrency scalability benefits from large and loosely coupled caches. Historically jemalloc has cached conservatively, with especially deleterious effects during rapid, large memory usage fluctuations.

This is because jemalloc's only sense of time has been in terms of allocation events, thus precluding work postponement. This talk will provide an overview of jemalloc internals, critically analyze several past approaches to cache management, and describe multiple opportunities enabled by wall clock awareness.


Video (36:48)