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.

HardTechnical
62 practiced

Provide a plan and sample commands to perform CPU and memory profiling of a production Go service experiencing intermittent spikes. Include how to capture pprof CPU and heap profiles with minimal overhead, analyze with pprof and flamegraphs, and use findings to propose code or configuration changes.

HardTechnical
67 practiced

You observe p95 latency spikes coinciding with CPU saturation and increased I/O wait. Propose a step-by-step approach to determine whether the system is CPU-bound, I/O-bound, or suffering from thread contention or locking. Include profiling tools, commands, and what thresholds or signals would lead to each diagnosis.

HardTechnical
63 practiced

A transactional database reports increased average read latency while QPS remains constant and connection wait times increase. Describe how you would profile queries, analyze index usage and buffer pool behavior, and propose at least four tuning steps that could reduce read latency. Include both schema/query changes and server-level configuration.

EasyTechnical
52 practiced

Compare sampling-based profilers and instrumentation-based profilers. What are the strengths and weaknesses of each approach in production, how do they affect overhead and accuracy, and when would you choose one over the other for an SRE investigation?

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.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.