On Wed, Apr 27, 2022 at 10:22 AM Grant Edwards <[email protected]> wrote: > > Is there any advantage (either to me or the Gentoo community) to > continue to use rsync and the rsync pool instead of switching the > rest of my machines to git? > > I've been very impressed with the reliability and speed of sync > operations using git they never take more than a few seconds.
With git you might need to occasionally wipe your repository to delete history if you don't want it to accumulate (I don't think there is a way to do that automatically but if you can tell git to drop history let me know). Of course that history can come in handy if you need to revert something/etc. If you sync infrequently - say once a month or less frequently, then I'd expect rsync to be faster. This is because git has to fetch every single set of changes since the last sync, while rsync just compares everything at a file level. Over a long period of time that means that if a package was revised 4 times and old versions were pruned 4 times, then you end up fetching and ignoring 2-3 versions of the package that would just never be fetched at all with rsync. That can add up if it has been a long time. On the other hand, if you sync frequently (especially daily or more often), then git is FAR less expensive in both IO and CPU on both your side and on the server side. Your git client and the server just communicate what revision they're at, the server can see all the versions you're missing, and send the history in-between. Then your client can see what objects it is missing that it wants and fetch them. Since it is all de-duped by its design anything that hasn't changed or which the repo has already seen will not need to be transferred. With rsync you need to scan the entire filesystem metadata at least on both ends to figure out what has changed, and if your metadata isn't trustworthy you need to hash all the file contents (which isn't done by default). Since git is content-hashed you basically get more data integrity than the default level for rsync and the only thing that needs to be read is the git metadata, which is packed efficiently. Bottom line is that I think git just makes more sense these days for the typical gentoo user, who is far more likely to be interested in things like changelogs and commit histories than users of other distros. I'm not saying it is always the best choice for everybody, but you should consider it and improve your git-fu if you need to. Oh, and if you want the equivalent of an old changelog, just go into a directory and run "git whatchanged ." -- Rich

