TL;DR

Brendan Gregg compared several ways to visualize the same filesystem dataset (linux 4.9-rc5), showing flame graphs, tree maps, sunburst charts and simple command-line listings. Each approach has distinct perceptual strengths and limitations; Gregg favors flame graphs as a default but recommends offering multiple views and testing across many sample filesystems.

What happened

Brendan Gregg produced side-by-side visualizations of the same directory tree (the linux 4.9-rc5 source) using flame graphs, multiple tree map tools, a sunburst layout, and command-line utilities. The flame graph version uses long, labeled horizontal rectangles that make it easy to compare relative sizes by length and supports mouse-over and zoom. Tree maps (GrandPerspective, Baobab) display file areas as nested boxes that highlight a few very large files but can omit labels and make proportion comparison harder. The sunburst view is an angular, polar projection of hierarchy that can visually exaggerate deeper slices; an example showed a slice visually larger but numerically smaller (27.7 MB vs 25.6 MB). Terminal tools (ncdu, du) provide quick textual summaries and simple bar or size listings but typically show one directory level at a time. Gregg concludes that a tool should ideally offer multiple visualizations and that flame graphs are a strong default subject to broader testing.

Why it matters

  • Different visual encodings change what users notice first and can distort perceived proportions.
  • A default visualization will influence troubleshooting and reporting unless alternate views are available.
  • Some layouts (sunbursts) require comparing angles rather than lengths or areas, which is harder for users.
  • Command-line summaries remain fast and practical but lack multi-level context without interaction.

Key facts

  • Dataset used for comparison: the linux-4.9-rc5 source tree (as shown in screenshots and ncdu/du outputs).
  • Flame graphs present hierarchy as horizontal rectangles whose lengths are easy to compare; they support mouse-over and click-to-zoom.
  • Tree maps better expose a few very large files at a glance but often lack labels and make proportional comparison more difficult than length-based charts.
  • Sunburst (polar) layouts can visually exaggerate deeper slices; in the example a slice shown as larger was 25.6 MB while another appeared smaller but was 27.7 MB.
  • ncdu shows an ASCII bar-chart style listing of one directory level at a time (example: drivers ~405.1 MiB, arch ~139.1 MiB in the sample output).
  • du produces a quick sorted size list and is the author's usual starting point for a quick inventory.
  • Baobab on Linux displays a directory list with mini bar graphs but requires clicking to expand into subdirectories.
  • Some tree map implementations (e.g., SpaceMonger) can include labels, while others (GrandPerspective example) may not show labels by default.
  • The author recommends offering flame graphs, tree maps, and sunbursts as alternative views in a filesystem usage tool.

What to watch next

  • Whether systematic testing across many different filesystems confirms flame graphs as the best default view (author recommends doing this).
  • Adoption of multi-view interfaces in disk-usage tools that let users switch between flame graphs, tree maps and sunbursts.
  • not confirmed in the source

Quick glossary

  • Flame graph: A hierarchical visualization that displays stacked rectangular bars (often horizontal) where length encodes a quantitative value and nesting indicates hierarchy.
  • Tree map: A space-filling visualization that represents hierarchy with nested rectangles whose area corresponds to quantitative values.
  • Sunburst: A radial, polar-coordinate representation of hierarchical data where rings represent depth and angular sweep encodes magnitude.
  • du: A command-line utility that summarizes disk usage, typically producing size totals per file or directory.
  • ncdu: A terminal-based disk usage viewer that presents directory sizes with simple ASCII bars and interactive navigation.

Reader FAQ

Which visualization did the author prefer as a default?
The author said he would probably use the flame graph as the default but would validate that choice across many sample filesystems.

Do sunburst charts always show proportions accurately to viewers?
Sunbursts can mislead because they require comparing angles; the example showed a visually larger slice that was numerically smaller.

Are tree maps better for finding single large files?
Tree maps make it easier to spot a handful of very large files at a glance, though they can make overall proportion comparisons harder.

Are command-line tools useful in this context?
Yes — du is quick for a top-level inventory and ncdu gives an interactive one-level view with ASCII bars, but both typically show one directory level at a time.

Brendan Gregg's Blog home Flame Graphs vs Tree Maps vs Sunburst 06 Feb 2017 Yesterday I posted about flame graphs for file systems, showing how they can visualize where disk…

Sources

Related posts

By

Leave a Reply

Your email address will not be published. Required fields are marked *