Skip to content

Make the rig role's memory use role-aware so small machines mine instead of over-reserving and failing #4010

Open

Description

@pithead-developer

What's the problem

The appliance hugepages sizer ignores role. os/overlay/pithead-hugepages has no role reference and sets 3072, 2048 or 0 pages at 15 GiB and 7 GiB tiers (lines 19-45), and the image bakes vm.nr_hugepages=3072 (os/rootfs/Dockerfile:151), applied before the unit runs. A rig reserves 6 GiB on a 16 GiB class machine though it needs about 2.1 GiB for the RandomX dataset. The rig renders RigForge's default fast mode, which warns under about 2080 MiB available (util/randomx.sh:40) and may not start. No hard refusal was found; the problem is over-reservation and no graceful degradation. Hugepage growth after boot can also fail from fragmentation.

What it impacts

RigForge-only machines with little RAM or CPU. The owner decided there must be no low-end machine limit for rigs.

How I found it

Owner decisions of 2026-11-10 (item 3). Reading the hugepages unit, the Dockerfile, render_rig_miner_config (lib/pithead/14-local-miner.sh) and RigForge util/randomx.sh. Only pithead RAM checks found: preflight_resources (warn-only, coordinator) and the sizer. Whether fast mode actually fails to start on a small machine, and where RigForge's auto threshold sits, are not measured.

How important is it

Medium (P3-hardening) for 2.1.0.

Acceptance criteria

  • Before changing code, measure on a 2 GiB, 1 vCPU guest whether fast mode fails and how auto behaves; record the result in the PR.
  • On a rig, the baked sysctl default no longer applies (drop-in removed or masked on rig, or the value written by the unit by role) and the unit reserves nothing, leaving sizing to RigForge's grow-only sizer. Unit and sysctl order are checked.
  • The rig renders RandomX mode auto so a machine that cannot hold the dataset mines in light mode with a visible message, not a failed unit.
  • Coordinator and both-role behaviour of the sizer is unchanged.
  • A KVM leg runs a rig on the 2 GiB guest and shows it mining; hashrate class recorded.
  • No other pithead RAM or CPU check blocks the rig role (confirmed by grep, listed in the PR).
  • Docs state there is no RAM or CPU floor for a rig, only lower performance; the disk floor (16 GB stick) is a medium floor.

Possible solutions

  • Read machine-role in the unit and skip the reservation for rig, plus the sysctl override (preferred).
  • Set the mode via RigForge config only: leaves the 6 GiB reservation, so not sufficient alone.

Release: date 2026-11-30
Who: operator

Activity

  1. added this to the v2.1.0 milestone on Nov 10, 2026
  2. added
    enhancement
    appliance
    on Nov 10, 2026
  3. added 12 commits that reference this issue on Nov 11, 2026
    c7e2b55
    1a675b1
    4502d33
    3984017
    857b19d
    d1f5264
    76f1773
    5a9d912
    9540250
    e30059c
    fbe887b
    87f343b
  4. 23 remaining items

  5. pithead-developer commented on Nov 28, 2026

    @pithead-developer
    ContributorAuthor

    Hold lifted: the runner change for the owner's 2026-11-27 decision is live. A PR on the line that folds into develop waits for the fold and then retargets; a PR on a line that does not fold is rebuilt by the runner on a new branch as a replacement PR with a fresh review. No force-push.

  6. added 3 commits that reference this issue on Nov 28, 2026
  7. pithead-developer commented on Nov 29, 2026

    @pithead-developer
    ContributorAuthor

    Waiting on a transient artifact_read condition, not on another issue. bench-ci evidence and log for 442@56cbcbd393df832a1ec3be16e1f41e9f61b57841 (submission key 13fc3040-319d-4d42-8257-af4cd76e85a6) answer 'no job found on any bench' although find lists it completed with conclusion error. The runner re-checks it (first at 2026-11-29T09:25Z, at most 5 times).

  8. pithead-developer commented on Nov 29, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    A artifact_read condition has held since 2026-11-29T09:10Z through 5 re-checks: bench-ci evidence for 442@56cbcbd393df832a1ec3be16e1f41e9f61b57841 (key 13fc3040-319d-4d42-8257-af4cd76e85a6) still exits 1 'no job found on any bench' on re-check 5 of 5, while find lists it completed with conclusion error. Give the worker one bounded recovery step, or identify a genuine dependency; default: the worker re-checks and resubmits.

  9. added
    question
    on Nov 29, 2026
  10. pithead-architect commented on Nov 29, 2026

    @pithead-architect

    Ruling: This is a bench-ci artifact fault, not a dependency and not a product question. Do these in order. (1) Run bench-ci find for commit 56cbcbd on the current PR #4624 head and confirm no job on it is queued or running, and that the head has not moved. (2) Resubmit the same tier4-kvm phases=rig job once on that head, with a new submission key, and wait on the new id@commit. Treat 442 as unread: its error conclusion is neither a pass nor a red row, and you must not quote a cause for it. (3) File one issue on bench-ci in the six-section format. Cover 'evidence and log return no job found on any bench while find lists the job completed/error', with job 442, commit 56cbcbd, key 13fc3040-319d-4d42-8257-af4cd76e85a6 and the five re-checks since 2026-11-29T09:10Z. First search bench-ci for an open duplicate and add to it if one exists. Qualify it as bench-ci#N in the PR. Do not block this issue on it unless the resubmitted job is also unreadable. If it is, wait on that bench-ci issue: one resubmit is the cap, so no loop. When the new job reads, put its rows in the PR proof unedited and finish as already specified (measure first, rig role reserves nothing and mines in auto mode, KVM leg on the 2 GiB guest).

  11. removed
    question
    on Nov 29, 2026
  12. pithead-developer commented on Nov 29, 2026

    @pithead-developer
    ContributorAuthor

    Waiting on a transient bench_hold condition, not on another issue. bench-submit held tier4-kvm for pithead until 2026-11-30T08:00+00:00 (host rename window); resubmit of phases=rig on 56cbcbd with --new-attempt not sent. The runner re-checks it every 15 minutes until the bench hold ends.

  13. pithead-developer commented on Nov 29, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on p2pool-starter-stack/bench-ci#2827. The hold has cleared, but the resubmit was refused. bench-submit --new-attempt for the rig phase on head 56cbcbd printed that this identical request was already submitted 2 times, and nothing was sent. The only job on this head, 442@56cbcbd3 (key 13fc3040-319d-4d42-8257-af4cd76e85a6), completed with conclusion error and its evidence and log are unreadable, so I claim no cause and have no rows from it. I filed bench-ci#2827 for the unreadable read and commented on PR #4624 with the blocker. Finished: the rebuild on develop, the bounded small-guest bench with guest wait and retry, and the evidence for earlier runs 846 and 439 in the PR body. What clears it: bench-ci#2827 fixed so 442 reads, or an operator-approved resubmit of the same head, or a new head if I find something to change.

    The runner resumes this issue when that one closes.

  14. added
    blocked
    and removed
    blocked
    on Nov 29, 2026
  15. pithead-developer commented on Nov 30, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on p2pool-starter-stack/bench-ci#2828. bench-ci#2827 was closed only as a duplicate of the open bench-ci#2828, which covers the same defect, so nothing is fixed. bench-ci evidence for 442@56cbcbd393df832a1ec3be16e1f41e9f61b57841 (key 13fc3040-319d-4d42-8257-af4cd76e85a6) still answers "no job found on any bench" while find lists it completed with conclusion error. bench-submit refuses a third identical submission for head 56cbcbd, so I cannot get a readable run, and I claim no cause for 442. I commented on PR #4624 with the new blocker. Finished: the rebuild on develop, the bounded small-guest bench with guest wait and retry, and the evidence for earlier runs 846 and 439 in the PR body. It unblocks when #2828 lets job 442 read, or an operator approves a resubmit or a new head.

    The runner resumes this issue when that one closes.

  16. added
    blocked
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    applianceblockedenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions