Live data from Hacker News

Out-Tridging Tridge by improving rsync

anchor.com.au

1–10 of 15 posts

Re: Out-Tridging Tridge by improving rsync

#2
ok this article had me intrigued (and the fix presented to speedup rsync for large files is good) but then, this gem:

"The thing is, modern networks aren’t like that at all, they’re high bandwidth and low latency"

No they're not. Unless you mean two machines sitting side by side in a data center or perhaps within the same metro area connected via wired connections.

Two machines sitting on either coast of US with the best wired connectivity at either end are at least 70-80 ms away from each other. That's not "low" latency.

Connected via anything less than a perfect connection on either end, now you're looking at 100+ ms latency.

One of the ends is on non-wired internet connection (LTE, Wimax etc.) and now you're looking at 150+ ms and with high standard deviation (in ping latencies).

Slow pace of latency improvements is as much a fact of life as the slow pace of battery life improvements. Perhaps because both are constrained by hard physical limits of nature.

Re: Out-Tridging Tridge by improving rsync

#3
does copying/moving a file over another not trigger copy-on-write in btrfs? If not, it seems a much simpler (but much less cool and useful for all) solution would be to patch rsync with an option to allow writing the temp file over the original when done. While still non-atomic, you'll get the copy-on-write semantics you need. Unfortunately it will use much more IO. There are ways to mitigate the extra IO, such as creating a special diff formatted temp file, but that getting out of the territory of "simple".

Also, in case the FS is saving copies of the temp file and you don't like that, the --temp-dir option might help with that.

Then again, depending on how btrfs treats overwriting a file with a move, if the temp file had a timestamp in the name (patch probably needed) in some form before replacing the original, that might be good enough.

Re: Out-Tridging Tridge by improving rsync

#4

ok this article had me intrigued (and the fix presented to speedup rsync for large files is good) but then, this gem: "The thing is, modern networks aren’t like that at all, they’re high bandwidth and low latency" No they're not. Unless you mean two machines sitting side by side in a data center or perhaps within the same metro area connected via wired connections. Two machines sitting on either coast of US with the…

Although in some cases being able to assume low latency and use the appropriate changes is appropriate. Rsync is used quite a bit to sync data on servers within the same datacenter, or even cabinet/switch.

Re: Out-Tridging Tridge by improving rsync

#5
I love rsync. It's also really useful for backing up local files incrementally. It's an easy CLI utility, but there's a GUI as well, called grsync.

You can use cron to automate them, which is how I backup my linux system nightly. Totally recommend it for server and local backups.

Re: Out-Tridging Tridge by improving rsync

#6

I love rsync. It's also really useful for backing up local files incrementally. It's an easy CLI utility, but there's a GUI as well, called grsync. You can use cron to automate them, which is how I backup my linux system nightly. Totally recommend it for server and local backups.

One of the useful modes for backups is to take a parameter (--link-dest) specifying a directory containing a previous backup. It will build hard links to the previous backup directory for files that did not change.

Re: Out-Tridging Tridge by improving rsync

#7

ok this article had me intrigued (and the fix presented to speedup rsync for large files is good) but then, this gem: "The thing is, modern networks aren’t like that at all, they’re high bandwidth and low latency" No they're not. Unless you mean two machines sitting side by side in a data center or perhaps within the same metro area connected via wired connections. Two machines sitting on either coast of US with the…

[deleted]

Re: Out-Tridging Tridge by improving rsync

#8
Sounds like a worthwhile improvement to rsync, but I wonder why this setup is preferred to duplicity [1] or rdiff-backup [2], which both also use rsync (librsync) to perform incremental backups. I've had good experiences with duplicity in particular.

[1] http://duplicity.nongnu.org/

[2] http://www.nongnu.org/rdiff-backup/

Re: Out-Tridging Tridge by improving rsync

#9
post #8

Sounds like a worthwhile improvement to rsync, but I wonder why this setup is preferred to duplicity [1] or rdiff-backup [2], which both also use rsync (librsync) to perform incremental backups. I've had good experiences with duplicity in particular. [1] http://duplicity.nongnu.org/ [2] http://www.nongnu.org/rdiff-backup/

rdiff-bachup will give you copies of the changed files (so 1.2TiB for the database file mentioned in the article) every time you run a backup for each old version you keep. It will not transfer that much data over the network (since it uses the rsync algorithm), but it stores that much on disk.

On the other hand, if you use a filesystem with copy-on-write snapshots and in-place modification of the changed files, you will only use as much disk space as there are changed blocks in the file for each version you keep. (Of course you have no additional redundancy if you keep n older version, as each bit of data is only stored once physically. But you only ever store one version of an unchanged file in the rdiff-backup scenario either, so you should alternate between different backup disks anyway.)

Re: Out-Tridging Tridge by improving rsync

#10

I love rsync. It's also really useful for backing up local files incrementally. It's an easy CLI utility, but there's a GUI as well, called grsync. You can use cron to automate them, which is how I backup my linux system nightly. Totally recommend it for server and local backups.

One of the useful modes for backups is to take a parameter (--link-dest) specifying a directory containing a previous backup. It will build hard links to the previous backup directory for files that did not change.

I use rsnapshot to automate this hard link creation and backup rotations hourly, daily, weekly, monthly. You still use cron or something else (I've used Launchd on OS X systems) to schedule the runs but rsnapshot takes care of the rest.
Post reply on HN