Repository navigation
dasLLAMA: examples on demand, a huge-page knob, the fleet's memory floor - #4751
Merged
Merged
Conversation
On Linux an allocation of 2 MB or more takes 2 MB alignment and MADV_HUGEPAGE. On a host whose memory is fragmented each such page fault waits on compaction: a cloud pod handed daslang fresh memory at 0.1-0.6 GB/s with the hint and 1.7 GB/s without. The variable drops the hint and keeps the alignment; unset, nothing changes. das_env_flag is the one parse of a flag's value, which the module-load trace read in two copies. nano, which has no environment, answers the allocator's question itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The four browser-example smoke tests spawn their example under a window and tell a story in real time; they sat in the audio, tts, translate and llm areas and the stocked suite, and were most of the tts area's time. They form the examples area now: --area examples runs them, a changed one still runs itself, and no engine module and no fixture plans them (standing_areas, every area but the on-demand ones). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
up reads how fast a new pod gives a process fresh memory - one 2 GB buffer of dd's - and remakes a pod under --min-gbs (1 GB/s) in the loop that already remakes one short of cores; the refusal names each floor that is on and what each try read. A run's children take DAS_NO_HUGEPAGE_HINT=1: a pod's host stalls on hinted page faults. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Behavior change:
DAS_NO_HUGEPAGE_HINTturns off the huge-page hint of large allocations on Linux; the dasLLAMA runner's four example smoke tests run only under--area examples; the pod fleet remakes a pod that is slow to hand out memory.Why. A cloud pod ran the gemma CPU cells 10x slower than the pod before it: the runtime's own huge-page request stalled in the host's memory compaction. And the tts area's time on a development box was mostly four example smokes that tell a story in real time.
What changes.
DAS_NO_HUGEPAGE_HINT(any value but empty or0): an allocation of 2 MB or more keeps its 2 MB alignment and dropsMADV_HUGEPAGE. Unset, nothing changes.das_env_flagis the one parse of a flag's value in the runtime; nano answers the allocator's question itself.run.das:test_interpreter,test_parrot,test_storyteller_restartandtest_storywishform the on-demandexamplesarea. They leave the audio, tts, translate and llm areas and thestockedsuite.pod_fleet.das up: a new pod is timed filling one 2 GB buffer and remade under--min-gbs(1 GB/s), in the loop that remakes one short of cores. A run's children takeDAS_NO_HUGEPAGE_HINT=1.Observable behavior.
--area ttsplans 18 files, not 22;--area examplesplans the four smokes;--changedplans one of them only when that file itself changed.DAS*variable is part of every compile record's name.up's log line of a kept pod reads27.2 cores, 2.0 GB/s of fresh memory.Where to look.
das_aligned_alloc16ininclude/daScript/misc/platform.h;ON_DEMAND_AREAS/standing_areasinmodules/dasLLAMA/tests/run.das;pod_readinginmodules/dasLLAMA/harness/pod_fleet.das.Validation, claims, ledger
Validation
Kind: intermediate PR of the dasLLAMA suite-speed arc (tooling and one runtime knob; no test cell changes).
What led to the knob (context, picking nothing: the default is unchanged). One cloud pod, RTX PRO 4500, EPYC 7713, Linux 6.8, transparent huge pages
madvise, the host's compaction failing 97% of its attempts:test_gpu_resident_gemma4_e2b.dasalone, the same binary, one run after the other: 517 s and 0 s of the cgroup's memory stall with the hint off, 791 s and 351 s stalled with it on.MADV_HUGEPAGEand 0.7 GB/s with it. A second pod on another host read the same.Scope report, RUN:
tests/fio/uncategorized.das11 of 11 withtest_no_hugepage_hintpassing, not skipping (the child reports one advised mapping underDAS_NO_HUGEPAGE_HINT=0and empty, none under=1);test_nano_ctxbuilds, links and printsnano_ctx: ok;test_run_suites.das32 of 32;test_pod_fleet.das12 of 12;up's read command prints2097152000 bytes (2.1 GB, 2.0 GiB) copied, 1.02341 s, 2.0 GB/s.&& das::hugepage_hint()removed fromdas_aligned_alloc16and the tree rebuilt,test_no_hugepage_hintfails (under the knob no mapping carries the advice: ADVISED=1); restored and rebuilt, it passes.-jit):run.das -- --suite model-free:REPORT suite model-free: 81 file(s), 0 failed, 187 cell(s) skipped, 241 s.run.das -- --changed:PLAN 24 file(s),REPORT changed vs origin/master: 24 file(s), 0 failed, 6 cell(s) skipped, 276 s.tests/fio/uncategorized.das: 11 tests, 10 passed, 1 skipped (the knob's test, by its platform gate).tests-aotamong the passes.NOT RUN:
test_run_suites.dasandtest_pod_fleet.das.upagainst a real slow pod:pod_readingandmemory_rateare tested on dd's lines, and the read command was run by hand on a pod.test_no_hugepage_hinton Windows and macOS: it skips there by its platform gate.Negative controls (each mutation made the named test fail, then was restored): the
examplesbranch ofsuite_files; each example file put back intostockedor an area;ON_DEMAND_AREASandstanding_areas; the three standing-area defaults ofareas_for_pathandfixture_areas; the examples suite out ofarea_plan's census;memory_rate's guards;keeps_memory's floor and off switch;memory_reading's unread arm; the memory floor out of the refusal; the knob out of the fleet's environment.Audits: one checklist auditor per discovered
REVIEW.md(eight checklists in three groups), the TDD audit, the duplicate audit, one external review round (no findings).Claims
tests/REVIEW.md, thetest_aotrule:tests/fio/uncategorized.dasand the new child fixture are compiled bytest_aot; the preflight'stests-aotlane above is the run.modules/dasLLAMA/REVIEW.mdroutes numbers toREVIEW_MEASUREMENT.mdandREVIEW_RACE_PICKS.md: the timings above are context. They pick no default - the hint stays on unless the variable is set - and the fleet sets the variable for its own children on the pod's fact.src/REVIEW.md, static storage:hugepage_hint's function-localstatic const boolis written by its initializer alone.Checklist rules
modules/dasLLAMA/REVIEW.md: the rule on a test file running a module's code now reads "a test file of a standing area" - an on-demand area's file is planned for no module, which the rule otherwise forbade. The sentence beside theMODULE_AREASrule reads "every standing area".modules/dasLLAMA/tests/REVIEW_PINNED_GATES.md: thetest_run_suites.dasentry names the standing areas and the on-demandexamplesarea.Not done
--area examplesrun on a box with a window server.child_cache_dir-style keying is untouched: the fleet's new variable renames every compile record once.