From 3498eb63e394e4b4bed1b7053c4648ffe7f1f8bb Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 20 Sep 2025 10:47:43 +0100 Subject: [PATCH] Docs: partially-revert 3009957, fix link to glibc malloc tunables --- docs/src/content/docs/performance.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/src/content/docs/performance.md b/docs/src/content/docs/performance.md index b7613cac..b244dbe5 100644 --- a/docs/src/content/docs/performance.md +++ b/docs/src/content/docs/performance.md @@ -18,18 +18,15 @@ export UV_THREADPOOL_SIZE="$(lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc ``` libvips uses a glib-managed thread pool to avoid the overhead of spawning new threads. +The size of the shared thread pool will grow on demand and shrink when idle. The default number of threads used to concurrently process each image is the same as the number of CPU cores, except when using glibc-based Linux without jemalloc, where the default is `1` to help reduce memory fragmentation. Use [`sharp.concurrency()`](/api-utility/#concurrency) to manage the number of threads per image. -The size of the shared thread pool will grow on demand and shrink when idle. -For control over this, set the `VIPS_MAX_THREADS` environment variable -to a value between 4 and 1024 to pre-allocate the thread pool at process start. - To reduce memory fragmentation when using the default Linux glibc memory allocator, set the -[`MALLOC_ARENA_MAX`](https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html) +[`MALLOC_ARENA_MAX`](https://sourceware.org/glibc/manual/latest/html_node/Memory-Allocation-Tunables.html) environment variable before the Node.js process starts to reduce the number of memory pools. ```sh frame="none"