From d69c58a6da115dedef905a6a5d2ab9ddb89828df Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 18 Mar 2021 19:34:07 +0000 Subject: [PATCH] Docs: add section about Linux memory allocators --- docs/install.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/install.md b/docs/install.md index 4b6d0d77..31437a38 100644 --- a/docs/install.md +++ b/docs/install.md @@ -149,6 +149,23 @@ pkg install -y pkgconf vips cd /usr/ports/graphics/vips/ && make install clean ``` +## Linux memory allocator + +The default memory allocator on most glibc-based Linux systems +(e.g. Debian, Red Hat) is unsuitable for long-running, multi-threaded +processes that involve lots of small memory allocations. + +For this reason, by default, sharp will limit the use of thread-based +[concurrency](api-utility#concurrency) when the glibc allocator is +detected at runtime. + +To help avoid fragmentation and improve performance on these systems, +the use of an alternative memory allocator such as +[jemalloc](https://github.com/jemalloc/jemalloc) is recommended. + +Those using musl-based Linux (e.g. Alpine) and non-Linux systems are +unaffected. + ## Heroku Add the