(Note that while this question is about Hyper-v specifically, I'm actually interested in a generalized VM snapshot answer, unless the specific answer for Hyper-v does not apply to such a general explanation.)
I work at a large company with decent-sized VM infrastructure (a few thousand VMs). One of my server engineers is telling me that they do not allow the saving of VM snapshots for very long - they will allow a snapshot to be taken as a fallback before making a significant change to a VM, but that they need to delete it shortly afterwards (a few days or so, once we're sure our changes did not break anything).
I'm fine with that procedure - I don't expect snapshots to serve as a proxy for actual backups etc. And I can respect their desire to conserve space in the environment. What I disagree with is his reasoning. He says that the reason they need to delete them afterwards is that "snapshots can grow unbounded, every time you write to the HDD, it writes additional data to the snapshot, without limit. This is different from when you provision the original virtual HDD, where you can specify a maximum size. You cannot specify a maximum size for a snapshot."
From my understanding, snapshot images are a DELTA from the parent disk image. E.g., if I have a block on the original image that looks like:
0101 0101 0101
... and I then rewrite the middle section like so:
0101 1111 0101
... then the snapshot only stores the DIFFERENCE between the two (plus some data structure overhead that I'm sure adds complexity, but not significant from a storage perspective). Further, I understand that if I were to go rewrite those blocks back to their original state, the delta would then discard that block (so that future reads for that block would read through to the original image).
(I don't know much about HOW the snapshot stores the difference - I'm sure there are very complex structures which are necessary to keep it all organized. I'm only interested in the principle that it DOES store the difference, but not a "running history" of changes.)
He says that snapshots do not work like that - he says that if I have a block of data, I change it, and then I change it back, that EVERY time I do this, the snapshot will grow, eventually eating up a lot of disk space.
It was my understanding that a snapshot could never exceed the size of the original image (e.g. if you flipped literally every single bit on the HDD, the delta would store that), with maybe some constant overhead size as well. He seems to think that this is not true, that a VM snapshot will grow unbounded as more and more writes are made to the virtual HDD.
Am I misundersanding something about how VM snapshots work?