4 ms·
What an aggravating article to read. was quietly trying to delete some old Time Machine backups, and had selected quite a few of them when the Finder assured m
by userbinator 3y ago
What an aggravating article to read.
was quietly trying to delete some old Time Machine backups, and had selected quite a few of them when the Finder assured me that they came to a total of over 60 TB, and that was on a 2 TB SSD
Multiple links will count the same file multiple times if you traverse the filesystem the straightforward way, and filesystem compression and other trickery like CoW (which AFAIK is what Time Machine does) also no longer makes it valid to assume that the total size of all files on a storage device will be <= its capacity. I'm not even a Mac user, yet I easily knew what was going on at first glance.
A little sanity checking should have revealed that claiming that amount of space could exist on a 2 TB SSD was impossible.
It really irritates me to see people make such claims with confidence, ignorant of their own lack of knowledge. Disk compression (early 90s). Symbolic links (ever since UNIX existed). CoW backups (Time Machine and probably other preceding systems). Perhaps the missing sanity checking here is in the brain of this article's author...
https://eclecticlight.co/2023/04/28/apfs-hard-links-symlinks-aliases-and-clone-files-a-summary/ https://eclecticlight.co/2023/04/28/apfs-hard-links-symlinks...
https://eclecticlight.co/2022/07/23/explainer-the-arithmetic-of-snapshot-size/ https://eclecticlight.co/2022/07/23/explainer-the-arithmetic...
https://eclecticlight.co/2020/07/29/time-machine-and-snapshots/ https://eclecticlight.co/2020/07/29/time-machine-and-snapsho...
https://eclecticlight.co/2019/06/10/time-machine-past-present-and-future/ https://eclecticlight.co/2019/06/10/time-machine-past-presen...
...who clearly already knows about how this works !?
The only filesystem I know of in widespread use where the assumptions the author makes would be true is the FAT family. One link only. No compression (except as an add-on container). No CoW or other fancy features.
- bayindirh 3y agoAlso, it's extra confusing when this comes from a person who can reliably dig deeper into macOS than most people.
- tumult 3y agoYou're making the mistake that you're accusing the article of. Of course the author knows these things. As you just showed. Yet, the Finder GUI still reports bad information. Information that can mislead users into making bad decisions. That's what this article is complaining about. The article is talking about Finder, the GUI. It's showing screenshots. It's not talking about probing for CoW status using CLI filesystem tools. What are regular users supposed to do? A sanity check would at least have the Finder report nothing instead of incorrect information.
- bayindirh 3y agoHowever, the information is not wrong to begin with. You can extract that amount of data from the disk if you copy the filesystem to another filesystem which does not support these features.
- tumult 3y agoNo. There is not 60TB of data on the disk, which is what the GUI is reporting in the article. The GUI doesn't say that 60TB of data would exist if the snapshots were each individually flattened and expanded to another filesystem. It says there is 60TB of data filling the disk.
- bayindirh 3y agoHowever, the code traverses that amount of data. It doesn't matter if you pass over the same inode n times. From OS point of view, there's no difference. Of course you can write a more complicated calculation algorithm, but it'll require tons of syscalls to determine the type of the file handle you're interacting with and will be probably very slow. This is what rustup did inadvertently back in the day, and it caused NTFS to melt down to a halt because of stat() overhead [0]. [0]: https://www.youtube.com/watch?v=qbKGw8MQ0i8 https://www.youtube.com/watch?v=qbKGw8MQ0i8
- tumult 3y agoWhy does the user care about how many times an iterator passes over an inode? The Finder is reporting incorrect information to them and may lead them to make bad decisions, like buying unnecessary external storage drives. You've missed the point of the article.
- bayindirh 3y agoI don't think so, because a) macOS provides correct free space information, b) It explicitly says that "your backup disk is full, and I'll open up some space, so your earliest backup will be at $DATE", before actually deleting any snapshots. Our disagreements stem from the assumption that the reported space is incorrect to begin with, but there's already "disk on space" note on every file, which provides physical size of something. We can argue that the progress may be calculated over that number, but I still think it has its own limitations with performance.
- thedanbob 3y ago> I'm not even a Mac user, yet I easily knew what was going on at first glance. The vast majority of computer users wouldn't. 60 TB might be technically correct but it isn't useful. I don't want my computer to tell me "this data you're deleting adds up to 60 TB when you count it an unspecified multiple number of times". I want it to tell me (at least roughly) how much space on disk will be freed once it's deleted. If it can't do that, I agree with the author: I'd prefer an unlabeled progress bar, or perhaps 0-100%.
- FrustratedMonky 3y agoI'm joe blow apple user. Sorry, you have to have a masters in disk compression algorithms to interpret our tools. LOL. You didn't even count how many symbolic links exists? You plebian.