Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow, although it is just checking timestamps #454

Closed
viric opened this issue Feb 17, 2016 · 5 comments
Closed

Slow, although it is just checking timestamps #454

viric opened this issue Feb 17, 2016 · 5 comments
Assignees
Labels
type: feature enhancement improving existing features

Comments

@viric
Copy link
Contributor

viric commented Feb 17, 2016

I have 164809 files to backup regularly (about 60GB)... Every time I run "restic backup" the report doesn't go beyond 33MB/s and checking with strace it's only doing lstat() calls.

This renders about 20 minutes per backup. I wonder what is restic doing, because being almost all files unmodified, it shows the steady 33MB/s and I understand that it only needs to lstat() them, which is exactly what restic already does at the first step of backup just to show the total size, in 6 or 7 seconds.

Is it just the cpu time spent in checking the contents for that same file/timestamp is already present in a restic previous snapshot?

@fd0 fd0 added type: feature enhancement improving existing features type: question/problem usage questions or problem reports labels Feb 19, 2016
@fd0
Copy link
Member

fd0 commented Feb 19, 2016

At the moment, the metadata for the files and directories is not cached, but loaded (and decrypted) from the repository. This is done once per directory. I'm planning to cache metadata locally, which is not yet implemented but should speed up "incremental" backups a lot.

@Kidswiss
Copy link
Contributor

Hi

Could this also cause poor performance for incremental backups over a slow WAN connection?

I just backed up a folder with something over 9000 files and 250MB to a remote s3 server. Both computers are connected with an asymmetrical internet connection of 50/5 mbit/s down and up.

The initial backup took about 5 minutes and seemed pretty reasonable. But a second backup shortly after that took almost twice as long! A folder with less files seems to be much faster.

@fd0
Copy link
Member

fd0 commented Aug 13, 2016

Yes, this will most likely be the reason. For this particular use case there's a workaround: use the -f (--force) option for the backup command, which will read all files locally again and not load metadata from the repo. That should be fast.

@Kidswiss
Copy link
Contributor

Thank you very much! Works like a charm!

@fd0 fd0 removed the type: question/problem usage questions or problem reports label Aug 13, 2016
@fd0 fd0 self-assigned this Sep 4, 2016
@fd0
Copy link
Member

fd0 commented Sep 26, 2017

We've added a local metadata cache (see #1040) in the master branch, I think this issue is resolved and therefore I'm closing it. Thanks!

@fd0 fd0 closed this as completed Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancement improving existing features
Projects
None yet
Development

No branches or pull requests

3 participants