scy,
@scy@chaos.social avatar

Ugh, so in one of the replies to my experiments with and associated tooling, @guerda asked "well, why not ?" and turns out, my main reasons against using restic (no compression and no exclude exceptions) are no longer valid, so I'm currently re-evaluating it.

Almost finished my writeup. And you know what? Both are really good.

My decision might boil down to performance against remote hosts and SSH vs SFTP, and whether "rclone serve restic" can save the day there.

skyr,
@skyr@chaos.social avatar

@scy @guerda does Restic do some sanity checks on startup, like checking for typical symptoms of a defective RAM module?

I remember the main author of Borg telling me that Borg does that, because he wanted to get rid of related bug reports. I love that level of sophistication 😊

scy,
@scy@chaos.social avatar

The main thing missing from 's compression feature¹ is what calls "auto": try compressing a small part of the file to see if it makes sense at all (i.e. if the file is compressible), and skip compressing that file if it doesn't. Right now, restic can only compress all files during a run, or none.

¹ other than documentation; it's not cool that I had to dig through the source to find the difference between "auto" and "max" compression, and which algorithm it's using at all

scy,
@scy@chaos.social avatar

(For the record, "auto" is equivalent to zstd level 3, while "max" is equivalent to zstd level 11.)

scy,
@scy@chaos.social avatar

The readme of https://github.com/restic/rest-server, 's HTTP server, mentions that is inefficient:

> everything needs to be transferred in chunks of 32 KiB at most, each packet needs to be acknowledged by the server

So, how much faster is rclone serve restic --stdio over SSH (because my destination doesn't support Rest Server via HTTP)?

Almost 20 %.

Uploading 5 GB over my 50 Mbps link took 16m08s via SFTP, but 13m31s via rclone.

For reference, 's SSH transport took 13m49s.

scy,
@scy@chaos.social avatar

Command lines were these:

restic -o rclone.program='ssh myserver rclone' -r rclone:repo backup --compression off 5Grandom

restic -r sftp:myserver:repo backup --compression off 5Grandom

borg create -C none --stats --progress myserver:repo::foo 5Grandom

Always using a fresh repo and the same 5Grandom file, which was dd if=/dev/urandom bs=1M count=5000 > 5Grandom

I intend to use this with a #Hetzner Storage Box, https://fluix.one/blog/hetzner-restic-append-only/ is a good setup guide.

Tests ran against a vServer tho.

binbash,
@binbash@chaos.social avatar

@scy What about NFS? This should be quite fast as well, shouldn't it?

scy,
@scy@chaos.social avatar

@binbash I have no idea :)

Congratulations, you've just won a research task ;)

binbash,
@binbash@chaos.social avatar

@scy Well, it came to my mind because I was able to send with max LAN speed to my local server this way. So with a study with n=1 I rest my case :3

traumaphoenix,
@traumaphoenix@chaos.social avatar

@scy restic uses zstd if I recall. zstd has heuristics that turn it into basically a no-op when it detects incompressible data. ⚙️

scy,
@scy@chaos.social avatar

@traumaphoenix Huh! Does it? On my machine, restic with compression "auto" appeared to be significantly slower than Borg with a compression setting of auto,zstd,3, even though restic was running on two cores instead of Borg's one.

Do you have any links about that? And does that also apply to the pure-Go implementation klauspost/compress that restic is using?

traumaphoenix,
@traumaphoenix@chaos.social avatar

@scy don’t know, but there’s a fairly simple check you can do to test for this behavior (note the transfer speed). in restic you’ll want to use dry runs or fresh repos, since it dedupes.

fd0,

@scy we tried to keep the UI as simple as possible. The Go zstd lib we're using is a noop for incompressible data, therefore we decided against adding a compressibility estimator ourselves.

scy,
@scy@chaos.social avatar

@fd0 The klauspost/compress docs don't seem to mention that no-op behavior you're mentioning, can you point me to some piece of documentation or even code that confirms this?

fd0,

@scy AFAIR we have an issue somewhere where Klaus describes it, I'll have a look later

scy,
@scy@chaos.social avatar

@fd0 Thanks! I guess you mean https://github.com/restic/restic/issues/21?

I've looked into the design behind what zstd does here for a few minutes (not checking actual code), the behavior seems to be "if a block can't be compressed, don't store it compressed, but continue trying to compress the rest of the file". This is mainly designed to save CPU cycles during decompression, the reasoning being "the beginning of the file could be not representative of the rest".

https://news.ycombinator.com/item?id=36605353

cc @traumaphoenix

traumaphoenix,
@traumaphoenix@chaos.social avatar
fd0,

@scy @traumaphoenix for restic, compression is handled on a "blob" level, which is a chunk of a few megabytes of a file. Due to its architecture, we cannot easily turn compression of just for a file, so each block is compressed individually.

In my tests, compression off and compression auto mostly had the same runtimes, I'm curious for your measurements.

🙂

scy,
@scy@chaos.social avatar

@fd0 Here you go :)

So, I'd say the difference between off and auto on this particular machine is 10 % more time for 10 % compression. "max" however doesn't seem to pay off that much at all.

This is a Celeron 3965Y, two cores at 1.5 GHz, so not massively powerful.

frederic,
@frederic@chaos.social avatar

@scy @guerda When evaluating restic, have a look at resticprofile as well. Neat little wrapper with features like profiles (with inheritance), systemd scheduling, Prometheus pushgateway integration, etc.

schenklklopfer,
@schenklklopfer@chaos.social avatar

@scy I recently needed to decide between borg and restic.

I've choosen restic - besides beeing very similar - most blogs and comparsions says that restic is more stable against corruptions of the repository.

Don't know why nor any details...

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • rosin
  • tester
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • megavids
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • normalnudes
  • Durango
  • cisconetworking
  • anitta
  • modclub
  • cubers
  • Leos
  • provamag3
  • JUstTest
  • lostlight
  • All magazines