Yesterday I posted about flame graphs for file systems , showing how they can visualize where disk space is consumed. Many people have responded , citing other tools and visualizations they prefer: du, ncdu, treemaps, and the sunburst layout. Since there's so much interest in this subject, I've visualized the same files here (the source for linux 4.9.-rc5) in different ways for comparison.

Flame Graphs

Using FlameGraph ( SVG ):

While you can mouse-over and click to zoom, at first glance the long labeled rectangles tell the big picture, by comparing their lengths and looking at the longest first:

The drivers directory looks like it's over 50%, with drivers/net about 15% of the total. Many small rectangles are too thin to label, and, they also matter less overall. You can imagine printing the flame graph on paper, or including a screen shot in a slide deck, and it will still convey many high level details in not much space. Here's an example someone just posted to twitter.

Tree Map

Using GrandPerspective (on OSX):

What can you tell on first glance? Not those big picture details (drivers 50%, etc). You can mouse over tree map boxes to get more details, which this screenshot doesn't convey. It is, however, easier to see that there are a handful of large files with those boxes in the top left, which are under drivers/gpu/drm/amd.

Using Baobab on Linux:

You can see that the drivers directory is large from the tree list on the left, which includes mini bar graphs for a visual line length comparison (good). You can't see into subdirectories without clicking to expand.

Here I've highlighted the drivers/net box. What percentage is that of total from first glance? It's a little bit more difficult to compare sizes than lengths (compare to earlier).

This is also missing labels, when compared to the flame graph, although other tree maps like SpaceMonger do have them. An advantage to all tree maps is that we can more easily use vertical space.

Sunburst

Using Baobab on Linux:

This is a flame graph (which is an adjacency diagram with an inverted icicle layout), using polar coordinates. It is very pretty, and as someone said "it always wows". Sunbursts are the new pie chart.

Deeper slices exaggerate their size, and look visually larger. The problem is this visualization requires the comparison of angles, instead of lengths, which has been evaluated as a more difficult perceptive task. That larger slice I highlighted is 25.6 Mbytes, and the smaller one is 27.8 Mbytes.

Requires reading. Although this is so quick it's my usual starting point.

Which to use

If you're designing a file system usage tool, which should you use? Ideally, I'd make flame graphs, tree maps, and sunbursts all available as different ways to understand the same data set. For the default view, I'd probably use the flame graph, but I'd want to check with many sample file systems to ensure it really works best with the data it's visualizing.

For more about flame graphs see my ACMQ article The Flame Graph ( CACM ), and for more about different visualizations see the ACMQ article A Tour through the Visualization Zoo ( CACM ), by Jeffrey Heer, Michael Bostock, and Vadim Ogievetsky, especially the section on Hierarchies.