Hans van Kranenburg posted on Mon, 30 May 2016 23:18:20 +0200 as excerpted:
>> Snip the dump, but curious as a user (not a dev) what command you used. >> Presumably one of the debug commands which I'm not particularly >> familiar with, but I wasn't aware it was even possible. > > It's the output of a little programming exercise calling the search > ioctl from python. https://github.com/knorrie/btrfs-heatmap > > While using balance I got interested in knowing where balance got the > information from to find how much % a chunk is used. I want to see that > list in advance, so I can see what -dusage the most effective would be. > My munin graphs show the stacked total value, which does not give you an > idea about how badly the unused space is fragmented over already > allocated chunks. > > So, with some help of Hugo on IRC to get started, I ended up with this > PoC, which can create nice movies of your data moving around over the > physical space of the filesystem over time, like this one: > > https://syrinx.knorrie.org/~knorrie/btrfs/heatmap.gif > > Seeing the chunk allocator work its way around the two devices, choosing > the one with the most free space, and reusing the gaps left by balance > is super interesting. :-] Very cool indeed. Reminds me of the nice eye candy dynamic graphicals that MS defrag had back in 9x times. (I've no idea what they have now as I've been off the platform for a decade and a half now.) I may have to play with it a bit, when I have more time (I'm moving in a couple days...). -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html