Replies: 2 comments
|
Draft fix: #2799 — the shared backend recommendation is floored to whole MiB, with a 128 GiB regression test. All 164 process-memory-enforcer tests pass. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
Problem
The admin memory-guard banner can enter an impossible rounding loop for
iogpu.wired_limit_mb.For 128 GiB of RAM, the 95% safety threshold is:
The kernel sysctl accepts whole MiB. The highest realizable value that does not exceed that threshold is
124518 MiB(130566586368bytes).However, the backend exposes the exact byte threshold as
_metal_wired_limit_request. The admin UI compares the kernel's whole-MiB value against those exact bytes, sees124518 MiBas slightly too low, and formats the suggested command withMath.ceil, producing:After setting
124519, the backend correctly reports that this exceeds the safe 95% recommendation and recommends124518instead. The user therefore cannot satisfy both warnings.Reproduction
iogpu.wired_limit_mb=124518.124519.124519and restart oMLX.124518 MiB.Expected behavior
All hints, comparisons, and the displayed command should use the same realizable whole-MiB recommendation. For this machine that is
124518.Proposed fix
Floor
_wired_limit_suggestion_bytes()to a whole MiB after applying the 5% safety clamp. This centralizes the unit conversion so the backend log, admin API, and UI receive the same safe value. Add a 128 GiB regression test that verifies124518 MiBdoes not trigger another raise hint.Validation
The proposed change passes all 164 tests in
tests/test_process_memory_enforcer.py.All reactions