Repository navigation
feat: configure GPU wired memory before starting oMLX - #5
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Configure the host-wide Metal wired-memory ceiling from
tfconfig.yamlbefore oMLX starts. Previously TF left the macOS GPU ceiling unchanged, regardless of inference memory requirements.Positive integer values are GiB; omitted node values inherit the service setting, and explicit null restores the calculated default. Invalid settings, unsupported hosts and sysctl failures prevent oMLX startup. Bootstrap, daemon restart and sync-with-restart share this path; dry-run remains read-only. The legacy user/process managers do not apply this privileged policy.
The system plist starts a short root setup command, then invokes oMLX through
sudo -n -H -u <node.user>. No additional sysctl sudoers permission is granted. This belongs to inference-node management, not Olla routing, and does not override oMLX's memory guard (--memory-guardor--memory-guard-gb).Evidence
iogpu.wired_limit_mb.After: 60 focused tests pass, including executable shell fixtures for 128/64 GiB defaults, explicit overrides, idempotence, out-of-RAM limits, write/readback failures, argument quoting and the YAML-to-CLI dry-run path. Real sudo/sysctl mutations are replaced by fixtures.
make dev-lint,git diff --check, macOSplutil -lint, and/bin/sh -npass.tfconfig.example.yaml. Existingtest_cluster_status_reports_inference_healthexpects13Gbut the example model metadata produces11G; the same failure was reproduced against unchanged main source. The final CLI dry-run assertion was subsequently checked in the passing focused run.Merge Danger
Door: two-way
Set the previous explicit GiB ceiling and restart to roll back the value. To restore the macOS automatic policy, remove the startup policy before resetting
iogpu.wired_limit_mb=0; otherwise the next start reapplies it.Blast Radius: inference-hosts
The next managed daemon installation/restart applies the new default even when the field is absent. The ceiling is host-wide, shared by GPU processes, and raising it can increase memory pressure. Hosts with RAM ≤10 GiB require an explicit positive limit below physical RAM. oMLX remains non-root, but the launchd entry now starts as root for setup; real launchd/sudo privilege handoff and reboot behavior still need a node canary. oMLX's independently configured memory-guard ceiling may remain lower.