As the lead on a game shipping to several consoles, PC and dedicated servers, how do you set and enforce memory budgets per platform and per subsystem?
answer
- a fixed wall, not a soft limit
- retail figure, not the dev kit
- categories with named owners
- held-back reserve
- automated peaks break the build
basics
~20 sBudget from each platform's retail memory, split by category with named owners and a held-back reserve, and make it measurable: tag every allocation, record per-level peaks in automated runs, fail builds that exceed. Dedicated servers budget per match process.
solid answer
~50 sOn a console, memory is a fixed wall: there is usually no paging to disk to absorb an overrun, so running out is a crash. Start from the memory each retail platform gives the game, measured against retail rather than development kits, which often carry more. Divide it into category budgets with named owners (textures, meshes, audio, level arenas, the scripting heap and more), plus a reserve held back for late surprises. Then make the standing calls: fixed heaps per subsystem or one shared heap with tags, isolation against utilisation; whether content scales per platform or the tightest platform shapes everyone's content; how strict enforcement is. Enforcement must be automatic: every allocation is tagged, nightly runs visit every level on every platform and record per-category peaks, and an overrun breaks the build. On dedicated servers, memory per match process sets how many matches a host runs, so it is a cost budget as well.
go deeper
Know that every platform has a fixed memory limit and that teams split it into budgets per category such as textures, audio and gameplay.
Explain why budgets cover peaks rather than averages, and why allocations are tagged by category so reports show who owns what.
Describe automated per-level peak measurement on every platform, testing against retail limits, and tracking largest free block as well as totals.
Own the trade-offs: fixed versus shared heaps, per-platform content scaling, enforcement strictness, reserve size, and server memory as a matches-per-host cost.
## Why memory needs a budget at all On a **console**, memory is a fixed amount shared by everything the game does, and the game generally cannot page its data out to disk to survive an overrun: going over is a crash, often late in a session and hard to reproduce. On **PC**, the operating system can page, so an overrun shows up as stutter rather than a crash, but the smallest supported configuration still sets a floor. On a **dedicated server**, memory per process decides how many matches one host can run, which turns memory into money. Without budgets, every team optimises its own feature and the total is discovered at the end. A **memory budget** turns the total into a set of numbers that teams own from the start. ## Building the budget 1. **Start from the retail figure.** Take the memory each platform's retail hardware makes available to the game. **Development kits often have more memory than retail units**, so a build that fits on a kit can still crash for players. 2. **Split by category**, each with a named owner. A scenario's split for a 9 GB game allocation might be: | Category | Budget (scenario figures) | |---|---| | Textures and the texture streaming pool | 4.0 GB | | Meshes | 1.2 GB | | Gameplay heaps and level arenas | 1.0 GB | | Engine overhead and frame allocators | 0.8 GB | | Audio | 0.6 GB | | Animation data | 0.5 GB | | Scripting heap | 0.4 GB | | Reserve, held back by the lead | 0.5 GB | | **Total** | **9.0 GB** | 3. **Hold back a reserve.** Late features, patches and the last few weeks of content always need room; a reserve that the lead releases deliberately prevents the final month from becoming a memory crisis. 4. **Budget peaks, not averages.** A level's worst moment, such as a boss arena with full effects while streaming the next area, is what must fit. ## The standing decisions a lead owns | Decision | Option A | Option B | The trade | |---|---|---|---| | Heap structure | fixed heap per subsystem | one shared heap with tagged tracking | isolation and clear blame versus using every byte | | Platform spread | content scaled per platform (lower texture detail on the tightest) | the tightest platform shapes all content | richer content on larger platforms versus one simpler pipeline | | Enforcement | builds fail on overrun | overruns reported, fixed by owners | discipline versus velocity, especially early in production | | Reserve size | generous | tight | safety for late surprises versus content quality now | There is no universally right column: a team shipping on very different hardware leans toward per-platform scaling, while a team with similar targets keeps one content set. Fixed heaps make one team's overrun its own problem, but unused slack in one heap cannot be lent to another; a shared heap uses memory fully but lets one overrun crash someone else's system. ## Enforcement that survives production - **Tag every allocation** with its category, so reports answer "whose memory is this?" without a hunt. - **Automate the measurement**: nightly runs fly through or play every level on every platform and record peak usage per category. - **Make regressions visible the day they land**: a commit that pushes a category over budget fails the build or raises an alert to its owner. - **Test against retail limits**: development builds constrain themselves to the retail figure, even on kits with more. - **Track the shape, not just the total**: largest free block and per-level baselines catch fragmentation and leaks before they reach players. - **Review budgets at milestones**, moving memory between categories as the game's needs become clear. ## Server-side budgets For a dedicated server, the budget question is **matches per host**. In a scenario where a host gives 60 GB to match processes and each process peaks at 1.5 GB, the host runs 60 / 1.5 = **40 matches**; trimming each process to 1.2 GB raises that to 60 / 1.2 = **50 matches**, a quarter more capacity from the same hardware. Servers usually load no textures or audio, so their categories are simulation state, per-player data, level collision and navigation data, and network buffers. A per-player budget lets the team say what a larger match will cost before it is built. ## When budgets break Budgets fail socially before they fail technically: numbers set once and never measured, a reserve spent quietly, or a platform measured only at the end. A lead keeps them alive by treating a budget overrun like a failing test, owned and fixed, not negotiated away at ship time.
- Would you give each subsystem a fixed heap or use one shared heap with tracking?Fixed heaps make an overrun local and obvious, which suits large teams and tight consoles, but slack in one heap cannot help another and heaps need resizing as the game evolves. A shared heap uses every byte but lets one system's overrun crash another's. Many teams combine them: fixed heaps for the largest, most volatile categories and a tracked shared heap for the rest.
- How do you stop a held-back reserve from disappearing early?Make the reserve a line in the budget that only the lead can release, with each release recorded against a reason and an owner. Automated reports show the reserve as untouched until then, so a category that silently grows into it shows up as an overrun, not as absorbed slack.
- A build that fits on a development kit fits on retail hardware
- Budgets can be set once at the start and left alone
- Average memory use is the number to budget
- Out-of-memory on a console is recovered by paging to disk
- Server memory only matters for stability, not for cost