Skip to content

Skip fopen for file change check to avoid network penalty#2970

Merged
MichaelEischer merged 1 commit intorestic:masterfrom
labkode:fopenskip
Oct 9, 2020
Merged

Skip fopen for file change check to avoid network penalty#2970
MichaelEischer merged 1 commit intorestic:masterfrom
labkode:fopenskip

Conversation

@labkode
Copy link
Copy Markdown
Contributor

@labkode labkode commented Oct 2, 2020

Closes #2969

This PR reduces drastically the time to perform a backup on top of a network filesystem. It does so by reducing the number of fopen calls by checking for file changes before.

On a 1 million files tree, the time to backup is reduced from 60 minutes to 22 minutes. Network filesystems are sensitive to fopen operations, as it often requires to open the file in the data server, while a stat operation does not.

Checklist

@labkode labkode changed the title Skip fopen for file change check to avoid network penalty [WIP] Skip fopen for file change check to avoid network penalty Oct 2, 2020
@MichaelEischer
Copy link
Copy Markdown
Member

Please squash the commits and add a changelog entry (see changelog/TEMPLATE for the template).

@labkode labkode changed the title [WIP] Skip fopen for file change check to avoid network penalty Skip fopen for file change check to avoid network penalty Oct 9, 2020
@labkode labkode requested a review from MichaelEischer October 9, 2020 08:30
@labkode
Copy link
Copy Markdown
Contributor Author

labkode commented Oct 9, 2020

@MichaelEischer PR is ready.

@labkode
Copy link
Copy Markdown
Contributor Author

labkode commented Oct 9, 2020

@MichaelEischer I've changed the wording with your suggestions, is much clear now.

@labkode labkode requested a review from MichaelEischer October 9, 2020 09:17
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot

@MichaelEischer MichaelEischer merged commit 862ee4b into restic:master Oct 9, 2020
@labkode
Copy link
Copy Markdown
Contributor Author

labkode commented Oct 9, 2020

@MichaelEischer thanks to you for such an amazing tool!
These are some stats with this PR merged, the time to perform the backup is drastically lower.

files 0.9.6 pull-2970
178K 7m 4m
420K 59m 16m
850K 1h51m 23m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip fopen on archiver for file change check

3 participants