rdfind icon indicating copy to clipboard operation
rdfind copied to clipboard

rdfind overestimates data reduction

Open Haravikk opened this issue 3 years ago • 0 comments

First of all, wanted to say thanks so much for making this really handy tool! I just migrated some huge APFS (macOS) volumes to ZFS, but where APFS supports clone files (files that are only copied when changed) ZFS does not so they all ended up copied over as duplicates, rdfind helped me trim this down by swapping them out for hard-links.

One thing I noticed while using the tool is that it seems to misreport the amount of data that can be reduced; for example, on the last batch I got an estimate of 13gb to be reduced, but after swapping the duplicates for hard-links the reduction was only 6.5gb.

I noticed the same for other batches as well; the reduction reported appears to be double what it should be. I'm guessing the total is mistakenly counting both the duplicates and their originals, rather then only the duplicates (the ones that will actually be deleted or replaced with a link).

This was seen on v1.4.1, I know it's not the very latest version but I didn't see anything in the changelog about reduction size reporting. The specific line I'm referring to is:

Totally, 13 GiB can be reduced.

It's possible I've just misunderstood what the total is intended to report, but in that case the message may need to be clarified? I would however expect the amount reported to be the amount of free space I should expect after removing/replacing the duplicates (on filesystems that recognise that hard links occupy basically no space anyway).

Haravikk avatar Feb 01 '22 22:02 Haravikk