Performance Profiling & Bottleneck Analysis Questions

Techniques for measuring where time and resources go in a running system and isolating the dominant bottleneck, independent of platform, language, or role. Covers CPU, memory, and allocation profiling, including GPU utilization profiling on ML-inference services; generating and reading flame graphs; choosing sampling vs instrumentation profiling; heap dumps and GC diagnostics; and using profiler, trace, and metric output to distinguish symptom from root cause. Emphasizes the measurement methodology itself: forming a measurement-first hypothesis before optimizing and validating that a fix actually worked, rather than the optimization technique applied afterward, the platform's resource limits, or production incident triage under time pressure.

EasyTechnical
70 practiced

Describe flame graphs and how to read them to identify CPU hotspots. Explain what the X and Y axes represent, what wide vs tall flames indicate, and how inlined functions or shared libraries affect interpretation when prioritizing optimizations.

EasyTechnical
73 practiced

Explain what profiling is in the context of Site Reliability Engineering. Describe the main goals of profiling, common types of profilers (sampling vs instrumentation), typical metrics collected (CPU, memory, I/O, network), and why SREs follow a measure-first, change-later approach to keep optimizations safe and reproducible.

EasyTechnical
66 practiced

Instrument a simple Python function with a decorator to measure and log execution time and memory delta. Provide a short code sketch and explain how you would minimize overhead so the decorator is safe in production for light sampling.

HardTechnical
63 practiced

You inherited a service that transforms data and serves features to models, but p95 latency occasionally spikes to 2s, harming model performance. Describe a systematic approach to identify bottlenecks across the stack, prioritize fixes (infrastructure, algorithms, I/O), and validate improvements under realistic load and production-like test harnesses.

EasyTechnical
72 practiced

You're debugging a slow request end-to-end. Walk through what metrics, logs, and distributed traces each tell you that the others don't, where each one falls short on its own, and how you'd combine them with a flame graph or CPU profile to actually pin down the bottleneck.

Unlock Full Question Bank

Get access to all 20 Performance Profiling & Bottleneck Analysis interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.