Memory & GC
Reveal answer and reasoning
Keep application code and data fixed while changing one startup policy. Use the same runtime patch version and representative limits, and allow comparable warmup. Validate output correctness before comparing performance. Set an acceptance condition that includes both memory headroom and user-visible latency. Roll back if the experiment violates the workload objective even when a favorite memory chart improves.
For an interview, explain why enabling server GC does not prove that a container cannot run out of memory. Distinguish managed retention, collector sizing and nonmanaged memory. Mention that replicas multiply baseline costs and that averages can hide one hot instance. A strong answer proposes measurements under the actual quota rather than presenting one magic environment variable as a complete capacity plan.
Run the portable observation on SharpRune and the SDK observation on desktop CoreCLR. List which statements are shared ownership principles and which are platform observations. Do not compare unlike counters as though they were a benchmark of which runtime is better.
Read the official settings for one chosen deployed runtime version and write down its name, default, unit, startup behavior and effective verification method. Build a small comparison matrix for normal load and a slow dependency. Finish by reserving native and transient headroom explicitly and explaining why a managed heap limit cannot replace a whole-process capacity model or an application admission policy.
What a strong answer covers
- Server GC, background GC and DATAS describe different decisions.
- Managed heap limits leave native and other process memory outside their budget.
- Read effective settings under the real CPU and memory constraints.
Common pitfall
Treating a managed heap limit as a whole-process limit, or assuming a project setting proves the effective runtime mode.
Follow-up questions
- Which startup setting, numeric unit and parsing rule are you verifying?
- How would CPU quota alter the configuration comparison?
Self-review
Choose what to revisit. These marks are your own assessment and are separate from lesson completion.