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
Add option to ignore acl and xattr for performance reasons #3039
Comments
The syscalls themselves are not the problem, rather that the xattr code is very slow. I think it is far better to fix that instead of adding yet-another option. get_flags is also not so good (on Linux, where a synthetic implementation is used). |
@ocofon we need to consider that borg always does full backups. That means that the archive created in the repository contains full metadata for all input files and references all the content chunks. So, even if ctime or mtime, size and inode number indicate that a file did not change, that full metadata information must come from somewhere. Currently, we do not store xattrs, acls or flags in the files cache, so they can only come from the filesystem If we would store these into files cache also, that would mean:
|
@ThomasWaldmann i agree, thats why i think a command line switch or another environment variable to disable it for people who don't need it would be the best solution. Its also seems that calling the acl_get() function would be completly unnecessary (at least on linux) when the exclusion of "system.posix_acl_*" would be removed from xattr.listxattr. |
Syscalls are irrelevant, see above. |
One get_flags() call that just checked for the NODUMP flag will be gone in 1.1.1 (by default, except when you give --exclude-nodump). You can get rid of the other one when giving --nobsdflags. This was needed for other reasons (not this ticket), just wanted to mention it. |
@ocofon could you benchmark with borg 1.1.2+ code to demonstrate the difference? Guess the worst case would be:
|
Guess the performance tests should be re-done with the code from PR #3918. |
I am closing this in favour of #3955. |
I recently switched my backups on some heavily loaded servers with slow disks from normal rsync to borg v1.1.0rcX.
On some server the backup need much more time than before.
It seems the reason for the slow backup is that borg causes a lot more syscalls for reading an unchanged file than rsync does.
While rsync uses a single lstat for any unchanged file borg uses 10 syscalls.
I patched borg-1.1.0rc3 with the following patch to disable the read of xattr, acl and inode flags:
With the patched version there is only one syscall for an unchanged file in borg.
The time needed for a backup is now comparable to the old rsync backup.
It would be great if borg would have an option to disable the reading of xattr and acl when there is no need for backup of those.
Maybe it is also possible to skip reading xattr on unchanged files because when xattrs are updated the ctime of the file changes.
Also the get_flags() is called twice on every file which is probably not necessary.
The text was updated successfully, but these errors were encountered: