Skip to content

@interwq interwq released this May 8, 2018 · 193 commits to dev since this release

This release is primarily about fine-tuning, ranging from several new features to numerous notable performance and portability enhancements. The release and prior dev versions have been running in multiple large scale applications for months, and the cumulative improvements are substantial in many cases.

Given the long and successful production runs, this release is likely a good candidate for applications to upgrade, from both jemalloc 5.0 and before. For performance-critical applications, the newly added TUNING.md provides guidelines on jemalloc tuning.

New features:

  • Implement transparent huge page support for internal metadata. (@interwq)
  • Add opt.thp to allow enabling / disabling transparent huge pages for all mappings. (@interwq)
  • Add maximum background thread count option. (@djwatson)
  • Allow prof_active to control opt.lg_prof_interval and prof.gdump. (@interwq)
  • Allow arena index lookup based on allocation addresses via mallctl. (@lionkov)
  • Allow disabling initial-exec TLS model. (@davidtgoldblatt, @KenMacD)
  • Add opt.lg_extent_max_active_fit to set the max ratio between the size of the active extent selected (to split off from) and the size of the requested allocation. (@interwq, @davidtgoldblatt)
  • Add retain_grow_limit to set the max size when growing virtual address space. (@interwq)
  • Add mallctl interfaces:

Portability improvements:

Optimizations and refactors:

  • Improve active extent fit with extent_max_active_fit. This considerably reduces fragmentation over time and improves virtual memory and metadata usage. (@davidtgoldblatt, @interwq)
  • Eagerly coalesce large extents to reduce fragmentation. (@interwq)
  • sdallocx: only read size info when page aligned (i.e. possibly sampled), which speeds up the sized deallocation path significantly. (@interwq)
  • Avoid attempting new mappings for in place expansion with retain, since it rarely succeeds in practice and causes high overhead. (@interwq)
  • Refactor OOM handling in newImpl. (@wqfish)
  • Add internal fine-grained logging functionality for debugging use. (@davidtgoldblatt)
  • Refactor arena / tcache interactions. (@davidtgoldblatt)
  • Refactor extent management with dumpable flag. (@davidtgoldblatt)
  • Add runtime detection of lazy purging. (@interwq)
  • Use pairing heap instead of red-black tree for extents_avail. (@djwatson)
  • Use sysctl on startup in FreeBSD. (@trasz)
  • Use thread local prng state instead of atomic. (@djwatson)
  • Make decay to always purge one more extent than before, because in practice large extents are usually the ones that cross the decay threshold. Purging the additional extent helps save memory as well as reduce VM fragmentation. (@interwq)
  • Fast division by dynamic values. (@davidtgoldblatt)
  • Improve the fit for aligned allocation. (@interwq, @edwinsmith)
  • Refactor extent_t bitpacking. (@rkmisra)
  • Optimize the generated assembly for ticker operations. (@davidtgoldblatt)
  • Convert stats printing to use a structured text emitter. (@davidtgoldblatt)
  • Remove preserve_lru feature for extents management. (@djwatson)
  • Consolidate two memory loads into one on the fast deallocation path. (@davidtgoldblatt, @interwq)

Bug fixes (most of the issues are only relevant to jemalloc 5.0):

  • Fix deadlock with multithreaded fork in OS X. (@davidtgoldblatt)
  • Validate returned file descriptor before use. (@zonyitoo)
  • Fix a few background thread initialization and shutdown issues. (@interwq)
  • Fix an extent coalesce + decay race by taking both coalescing extents off the LRU list. (@interwq)
  • Fix potentially unbound increase during decay, caused by one thread keep stashing memory to purge while other threads generating new pages. The number of pages to purge is checked to prevent this. (@interwq)
  • Fix a FreeBSD bootstrap assertion. (@strejda, @interwq)
  • Handle 32 bit mutex counters. (@rkmisra)
  • Fix a indexing bug when creating background threads. (@davidtgoldblatt, @binliu19)
  • Fix arguments passed to extent_init. (@yuleniwo, @interwq)
  • Fix addresses used for ordering mutexes. (@rkmisra)
  • Fix abort_conf processing during bootstrap. (@interwq)
  • Fix include path order for out-of-tree builds. (@cmuellner)

Incompatible changes:

  • Remove --disable-thp. (@interwq)
  • Remove mallctl interfaces:

Documentation:

Assets 3
You can’t perform that action at this time.