Evidence label: deterministic synthetic teaching model. This browser page executes a small JavaScript model of the stated policy. It does not run Java, access a JVM, create actual worker threads or contact a tool. Use it to understand the boundary and compare assumptions before running the separate Java example.
Predict the boundary before running the model
Predict whether a 2,048 MiB limit can accommodate the default allowances. Reduce the heap by 512 MiB, then increase the number of platform threads. Explain which quantities are estimates rather than measured resident memory.
Write a prediction for the terminal outcome, then use Run model. The summary reports the calculated end-state for the current inputs. The trace begins at its first event so you can inspect how that outcome is reached. Next event advances one row; Show complete trace exposes every row. Restart trace changes only the viewing position, not the selected inputs.
Run and inspect the synthetic experiment
Expected outcomes and useful counterexamples
The default planning sum is 2,176 MiB: a 128 MiB deficit. Reducing heap allowance from 1,536 to 1,024 MiB leaves 384 MiB after all modeled allowances. These figures are arithmetic, not observed JVM consumption.
Change one input, rerun and compare the exact values in the table. A boundary that still holds under the changed inputs is more informative than an attractive animation. Trace rows and text labels carry the result; the visual colors are supplementary. The model recalculates only after Run model, so an edited input does not silently replace the trace you are inspecting.
What this lab cannot establish
The categories are deliberately non-overlapping planning allowances. They are not a sum of NMT totals, RSS and direct-buffer counters, which can overlap. Stack allowance is for platform threads; virtual-thread stacks require different accounting. Committed pages, mappings, allocator behavior and third-party allocations are not simulated.
The controls have intentionally small finite ranges. They are not operational recommendations. No output here demonstrates production capacity, a recommended heap size, successful cancellation of a remote effect or a GC performance improvement. Use the downloadable Java fixture and then a representative integration test to investigate those separate questions. Keep the runtime version and the measurement method with any real results.
Continue with the Java implementation
Budget JVM Memory Beyond the Heap Before Increasing Concurrency contains the original Java fixture, the failure analysis and its primary references. Continue with Tune Java G1 From Allocation Evidence Before Changing JVM Flags to examine the next ownership boundary. The examples have synthetic non-personal inputs and do not require an account, API key or external service.
All six guides and labs · Lab catalog.
Views are my own and do not represent any employer, past or present.