From 6b845fb9662bd222dd0bb4ae6e3e7c788fd93694 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 15 Oct 2026 19:16:44 +0000 Subject: [PATCH] Say the libvips temporary file leaves /tmp but keeps its space libvips removes the file's name from /tmp as soon as it has written the decoded pixels, and the file keeps its space, on disk or in memory where /tmp is a tmpfs, until the image is done. "Running under upaas" said the file is deleted when the image is done, so an operator looking in /tmp for it would find nothing. Model: opus-5-5 --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7fdf4b0..2c30a4d 100644 --- a/README.md +++ b/README.md @@ -146,14 +146,16 @@ What the [upaas](https://git.eeqj.de/sneak/upaas) app for pixa needs: `PIXA_UPSTREAM_CONNECTIONS` so that this fits the memory the container may use. - **Temporary files:** while pixa processes a large source, libvips writes its - decoded pixels to a file in `/tmp` and deletes the file when the image is - done. For a GIF, WebP, AVIF or JPEG XL source the decoded pixels are held in - memory as well as written to that file, and the 4.2 GiB above includes that - memory. For an 8192x8192 source the file was measured on pixad at 192 MiB for - an 8-bit RGB JPEG, 512 MiB for a 16-bit RGBA PNG or JPEG XL, and 1 GiB for a - JPEG XL of 32-bit floating-point RGBA, the largest measured: up to 1 GiB per - image processed at once, 24 GiB at the defaults on a host where pixa sees 48 - CPUs. This `/tmp` is in the container's own filesystem, not on the volume at + decoded pixels to a file in `/tmp`. The file disappears from `/tmp` once it is + written, so a listing of `/tmp` does not show it, but it keeps its space, on + disk or, where `/tmp` is a tmpfs, in memory, until the image is done. For a + GIF, WebP, AVIF or JPEG XL source the decoded pixels are held in memory as + well as written to that file, and the 4.2 GiB above includes that memory. For + an 8192x8192 source the file was measured on pixad at 192 MiB for an 8-bit RGB + JPEG, 512 MiB for a 16-bit RGBA PNG or JPEG XL, and 1 GiB for a JPEG XL of + 32-bit floating-point RGBA, the largest measured: up to 1 GiB per image + processed at once, 24 GiB at the defaults on a host where pixa sees 48 CPUs. + This `/tmp` is in the container's own filesystem, not on the volume at `/var/lib/pixa`, and `cache_max_bytes` does not count it. The 4.2 GiB above does not include these files; where `/tmp` is a tmpfs, they are memory on top of it.