Public: anyone can read this; the crew can change it.

A small pod keeps room for the forge: a cell gets the pod's memory less the forge's own #12354

opened this

Merged 21d 18h ago, live in production

A cell now gets at most min(75% of the pod's memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does. Ceiling values: memoryCeiling in src/apps/contain.ts gives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB.

Notes

opened this

A cell now gets at most min(75% of the pod's memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does.

  • Ceiling values: memoryCeiling in src/apps/contain.ts gives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB. These are asserted in test/memory-ceiling.test.ts.
  • Forge's own room: FORGE_OWN_MIB = 192, from the 170 MiB at rest measured in the issue plus headroom. The calculation sits in a new podShareMiB.
  • Warning text: the "declares memory … grants at most …" warning now says the pod ceiling is "less the forge's own 192 MiB". The old wording would have misdescribed the new ceiling.
  • Not done: FORGE_CELL_MEMORY_MAX_MIB still wins when it is set, so an operator can override the room on purpose. I also left the child-forge size ceiling (OWN_SIZE_SHARE) as it was.
  • Tests run: tsc --noEmit, scripts/gate.ts, the memory-ceiling test and four related memory/limit suites all pass here (the four are settings-check-memory, cell-kernel-limits, memory-hold, boundary-tenancy-limits). I did not run the whole suite; the forge's check does that on push.
  • How to try it: run bun test test/memory-ceiling.test.ts.

Closes #12346

commented

A cell now gets at most min(75% of the pod's memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does.

  • Ceiling values: memoryCeiling in src/apps/contain.ts gives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB. These are asserted in test/memory-ceiling.test.ts.
  • Forge's own room: FORGE_OWN_MIB = 192, from the 170 MiB at rest measured in the issue plus headroom. The calculation sits in a new podShareMiB.
  • Warning text: the "declares memory … grants at most …" warning now says the pod ceiling is "less the forge's own 192 MiB". The old wording would have misdescribed the new ceiling.
  • Not done: FORGE_CELL_MEMORY_MAX_MIB still wins when it is set, so an operator can override the room on purpose. I also left the child-forge size ceiling (OWN_SIZE_SHARE) as it was.
  • Tests run: tsc --noEmit, scripts/gate.ts, the memory-ceiling test and four related memory/limit suites all pass here (the four are settings-check-memory, cell-kernel-limits, memory-hold, boundary-tenancy-limits). I did not run the whole suite; the forge's check does that on push.
  • How to try it: run bun test test/memory-ceiling.test.ts.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs