Date: Thu, 20 Oct 2005 23:34:38 +0400 From: "Andrew P." <infofarmer@gmail.com> To: user <user@dhp.com> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD UFS2 snapshots, and math ... Message-ID: <cb5206420510201234m140ea781o9f9034fa6b08cc58@mail.gmail.com> In-Reply-To: <Pine.LNX.4.21.0510201446430.8180-100000@shell.dhp.com> References: <44y84ojafe.fsf@be-well.ilk.org> <Pine.LNX.4.21.0510201446430.8180-100000@shell.dhp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/20/05, user <user@dhp.com> wrote: > > Hello, > > On 20 Oct 2005, Lowell Gilbert wrote: > > > user <user@dhp.com> writes: > > > > > Let's say I have a filesystem, and on that filesystem I create a snap= shot > > > every single night, and every night I delete the snapshot from 5 nigh= ts > > > ago. This means that at all times, I have four snapshots running on = that > > > filesystem, one from 1 day ago, one from 2 days ago, one from 3 days = ago, > > > and one from 4 days ago. > > > > > > Let's also assume that the percent change of the filesystem is 5% (ev= ery > > > day 5% of the blocks in the filesystem are either changed or deleted)= . > > > > > > ---- > > > > > > Does this mean that if that 5% change is a different 5% every day, th= at > > > the one day ago snapshot will be size 5%_of_filesystem, and that the = 2 day > > > ago snapshot will be size 10%_of_filesystem, day 3 15% and day 4 20%,= for > > > a total of 50% of the total filesystem taken up with snapshot data ? > > > > No. One copy of each version of the file that exists in any > > snapshot. Regardless of how many snapshots it's in. > > > That doesn't make much sense to me ... if the snapshot keeps track of > changed_data_since_snapshot_was_taken, then ... > > Well, think of it this way - let's say I have a 1G filesystem, which is > filled with a single 500M text file. Now let's say I snapshot that FS. > At this point, the snapshot takes up 0 bytes. Now let's say the next day > I alter 10% (50M) of that single 500M file - now the snapshot takes up > that exact same amount of space, namely, 50M. > > Now I create a second snapshot, which immediately yakes up 0 bytes. The > next day, I change a totally different 50M of my text file ... so now, th= e > first snapshot needs to keep track of yesterdays 50M of changes/deletions > as well as todays, because todays operates on totally different disk > blocks. So now 2-day-ago snapshot is size 100M, and the snapshot from on= e > day ago is now 50M. > > I think my interpretation is correct ... can you look over my and your > conclusions again ? > > > > > The second question is this: > > > > > > If the 5% data changed per day is the _same_ 5% every day (perhaps > > > changing the same table in a DB every day, or perhaps changing the sa= me > > > block of lines in a text file every day) does that mean that every da= y > > > simply represents 5%_of_filesystem, for a total of 20% of the total > > > filesystem in use at all times for snapshot data ? > > > > Whether it's the same data or not doesn't affect how much space you use= . > > > Yeah ... see, I think it does matter, for the reasons above ... if, as in > this second example, I am changing the same blocks on disk every day, the > snapshot just needs to keep track of them once, namely "this is what they > were during the snapshot, and you can change those same blocks all you > want, I just need to keep track of what they were when you took the > snapshot.." > > comments ? > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > What makes you so reassured, I wonder. Imagine that each data block is marked with labels on change. It doesn't matter how many labels there are, there will be only one data block saved.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb5206420510201234m140ea781o9f9034fa6b08cc58>