top | item 25026377

Show HN: btdu, a sampling disk usage profiler for btrfs

12 points| CyberShadow | 5 years ago |github.com

9 comments

order
[+] solarkraft|5 years ago|reply
This is great! I still have a feel for btrfs and think this tool's great explanations provide some good hints. I can also finally get a good and fast sense for a snapshot's size (I used to use to use btrfs send).

But ... is it normal to have massive amounts of data like everything except snapshots/ and var/ in my system subvolume being one of them, as error-nodes (/open (No such file or directory))?

Also: Is there a way to stop sampling after some time or amount of samples? It turns out your idea is correct and you don't actually need all that many to get a good impression :-)

Thanks for making it!

[+] CyberShadow|5 years ago|reply
> as error-nodes (/open (No such file or directory))?

No... This particular one most likely indicates that the path on btdu's command line is not to the root subvolume. The attached explanation mentions this when the node is opened. If it's not this, then it's not something I'm aware of - what paths are under the node?

> Also: Is there a way to stop sampling after some time or amount of samples?

Once you're satisfied with the precision, you can press p to stop sampling. Does that do it or were you looking for a configurable limit?

Thanks for the feedback!

[+] thespoonbends|5 years ago|reply
Clever. I like it. I've given up trying to understand where my btrfs disk usage is, and I think this will help.
[+] CyberShadow|5 years ago|reply
Written in D!

The basic idea behind this project is that you only need to cast 100 random samples to have roughly a 1% resolution, which is usually enough to know what ate your disk space. Even on very slow drives, resolving 100 samples should take no more than a few seconds.

[+] rini17|5 years ago|reply
Does it show the accuracy estimate, or it's wholly left to user guess?