Tools / Monitoring and Observability Interview Questions
What is a flame graph and how do you read it?
A flame graph is a visualization of a stack trace profile that makes it easy to identify which functions consume the most CPU time, memory, or other resources. It was invented by Brendan Gregg while at Netflix to visualize perf(1) output on Linux systems.
Reading a flame graph:
Y-axis (vertical): Each row represents a stack frame. The bottom of the graph is the starting point (main, or the thread entry point). Moving upward, each row is the function called by the one below it. A tall column means a deep call stack — many nested function calls.
X-axis (horizontal): The width of each box represents the proportion of samples in which that function appeared in the call stack. A wider box means more time was spent in or below that function. The order within a row is sorted alphabetically, not temporally — left is not earlier.
Color: In most flame graph tools, color is used only for readability (to distinguish adjacent boxes). Red/orange flames suggest hotness in some tools (like speedscope), but this is cosmetic, not inherent to the format.
Finding the bottleneck: Look for wide boxes near the top of the graph — these are functions that appear frequently at the top of call stacks, meaning the CPU was executing them (not calling children). A wide box deep in the stack that has many narrow children indicates a dispatcher pattern, not necessarily a bottleneck.
Differential flame graphs compare two profiles (before and after a change) by coloring regressions red and improvements blue, making performance regressions visually obvious.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
