Skip to content

Commit d69c58a

Browse files
committedMar 18, 2021
Docs: add section about Linux memory allocators
1 parent bdb1986 commit d69c58a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎docs/install.md

+17
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ pkg install -y pkgconf vips
149149
cd /usr/ports/graphics/vips/ && make install clean
150150
```
151151

152+
## Linux memory allocator
153+
154+
The default memory allocator on most glibc-based Linux systems
155+
(e.g. Debian, Red Hat) is unsuitable for long-running, multi-threaded
156+
processes that involve lots of small memory allocations.
157+
158+
For this reason, by default, sharp will limit the use of thread-based
159+
[concurrency](api-utility#concurrency) when the glibc allocator is
160+
detected at runtime.
161+
162+
To help avoid fragmentation and improve performance on these systems,
163+
the use of an alternative memory allocator such as
164+
[jemalloc](https://github.com/jemalloc/jemalloc) is recommended.
165+
166+
Those using musl-based Linux (e.g. Alpine) and non-Linux systems are
167+
unaffected.
168+
152169
## Heroku
153170

154171
Add the

0 commit comments

Comments
 (0)
Please sign in to comment.