Skip to content

vc_render_tifxyz: warn when --cache-gb is not below the memory available to the process - #1807

Open
nerln wants to merge 1 commit into
ScrollPrize:mainfrom
nerln:fix/render-tifxyz-cache-warning
Open

nerln wants to merge 1 commit into
ScrollPrize:mainfrom
nerln:fix/render-tifxyz-cache-warning

Conversation

@nerln

@nerln nerln commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Refs #1404 (the --cache-gb half). Prior work: #1415 addressed both halves of the issue (a clamp plus a torn-TIFF check) and was closed by the repository time limit without a human review; the torn-TIFF half is now in #1695. This PR only adds the warning the issue asks for on the --cache-gb side. Nothing is clamped and no default changes.

--cache-gb (default 16) at or above the memory the process can use made the render sit at the memory ceiling with no output and no log line, indistinguishable from a slow render (the report in #1404 is a Docker host with a 15 GB limit). The tool now prints one line to stderr when the requested cache is not below the usable memory: the cgroup limit when one is set (memory.max or memory.limit_in_bytes), otherwise physical RAM. On Windows there is no check.

Reproduced on main (1f544fa71) with a 3-slice render of a PHerc0125 segment, on a 16 GB machine:

$ vc_render_tifxyz ... --cache-gb 999          # before: renders, no warning
$ vc_render_tifxyz ... --cache-gb 999          # after
Warning: --cache-gb 999 is not below the memory available to this process (16.0 GB): the render can stall without any output. Lower --cache-gb.

@hendrikschilling, you merged #1528 on this file: could you take a look when you have a moment?

The patch was prepared with Claude Code under my direction; I built it and ran the reproduction above locally.

…ble to the process

--cache-gb at or above the usable memory (cgroup limit when set, else
physical RAM) stalled the render at the memory ceiling with no output
and no log line. Print one warning to stderr. Nothing is clamped.

Complements ScrollPrize#1695, which covers the torn-TIFF half of ScrollPrize#1404.

Refs ScrollPrize#1404

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 16, 2026 10:38
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

@nerln is attempting to deploy a commit to the scroll Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants