未加星标

Flame Graphs vs Tree Maps vs Sunburst

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

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:


Flame Graphs vs Tree Maps vs Sunburst

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):


Flame Graphs vs Tree Maps vs Sunburst

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:


Flame Graphs vs Tree Maps vs Sunburst

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.


Flame Graphs vs Tree Maps vs Sunburst

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:


Flame Graphs vs Tree Maps vs Sunburst

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.


Flame Graphs vs Tree Maps vs Sunburst

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.

ncdu --- /home/bgregg/linux-4.9-rc5 ----------------------------------------------- /.. 405.1 MiB [##########] /drivers 139.1 MiB [### ] /arch 37.5 MiB [ ] /fs 36.0 MiB [ ] /include 35.8 MiB [ ] /Documentation 32.6 MiB [ ] /sound 27.8 MiB [ ] /net 14.7 MiB [ ] /tools 7.5 MiB [ ] /kernel 6.0 MiB [ ] /firmware 3.7 MiB [ ] /lib 3.4 MiB [ ] /scripts 3.3 MiB [ ] /mm 3.2 MiB [ ] /crypto 2.4 MiB [ ] /security 1.1 MiB [ ] /block 968.0 KiB [ ] /samples [...]

This does have ASCII bar charts for line length comparisons, but it's only showing one directory level at a time.

du $ du -hs * | sort -hr 406M drivers 140M arch 38M fs 36M include 36M Documentation 33M sound 28M net 15M tools 7.5M kernel 6.1M firmware 3.7M lib 3.5M scripts 3.4M mm 3.2M crypto 2.4M security 1.2M block 968K samples [...]

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.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: Linux
tags: MiB,drivers,flame,see
分页:12
转载请注明
本文标题:Flame Graphs vs Tree Maps vs Sunburst
本站链接:http://www.codesec.net/view/530552.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(74)