Replication and ZFS DIFF

Status
Not open for further replies.

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
With the current state of automatic replication of FreeNAS-9.2.1.7-RELEASE-x64 (fdbe9a0), it can takes several minutes between replication, even when snapshot do not point to added or changed data.
Let's say I have 100 snapshots taken during a certain interval, but the dataset was not written to during that interval.
Doing:
zfs diff zvol@snap1 zvol@snap100

should return no changes within the dataset. If files are added or deleted, then it will show in the output.
In the event these snapshots don't report changes within the dataset, would it make sense for Freenas to suppress the snapshots that report no changes to the dataset? At least it would allow for faster replication, as it will have to deal with a lesser number of redundant snapshots.
This could potentially increase replication replication.

Does it makes sense or is it even worth it?
Also, snapshot manageability would be improved as it is easier to deal with a few snapshot. This makes sense if for instance a dataset as an automatic snapshot, let's say every 5 minutes, but when the dataset is not written to in 7 days, then we would get 7*60/5*24= 2016 snapshots all of each pointing to the same data.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No. What you're proposing is typically called a "band-aid fix". You're fixing something to correct a symptom rather than fixing the problem, which is that the replication stuff needs some tweaking.

Basically if you don't make snapshots except when there are changes, then you introduce additional complexity elsewhere in determining which snapshots can be safely removed. Managing snapshots by simply removing the ones you don't want becomes a real problem because you suddenly need an intelligent algorithm.
 

DaPlumber

Patron
Joined
May 21, 2014
Messages
246
Hmmm. Is the wall clock time the code trawling through the DB of snapshot entries even if they're zero size? Enquiring minds would like to know.

@jgreco: Is that what you meant by "tweaking"? ;) (Or should that be DB twerking? :p)
 
Status
Not open for further replies.
Top