Slow backup in version v2.0.3.10 downgrade to version 2.0.3.5

After a number of reports of this slowdown and possible mitigations, I will put up a v2.0.3.11 with a faster query as default.

This version will support a number of alternate queries, which can be used to further optimize the execution time for backups.

For most users this should mean that 2.0.3.11 should be significantly faster than 2.0.3.10, and hopefully faster than 2.0.3.9 as well.

For users that want to help out with getting things even faster, there is an environment variable that can be used to choose a different query to do the lookup.

To use this, you need to set the environment variable TEST_QUERY_VERSION to one of the following values:

  • TEST_QUERY_VERSION=1
    Use the original query used until Duplicati v2.0.3.9

  • TEST_QUERY_VERSION=2
    The default version used in v2.0.3.11, reported to be the fastest in v2.0.3.10

  • TEST_QUERY_VERSION=3
    An unverified contender to be the fastest query, proposed by @prez

  • TEST_QUERY_VERSION=4
    The query used in v2.0.3.10, but with an added optimization

If you set the environment variable correctly, you will get a warning after running a backup with the message Using performance test query version ___ as the TEST_QUERY_VERSION environment variable is set.

After testing each version, make sure to check that “OpenedFiles” is not equal or close to “ExaminedFiles” as that indicates that the query fails and each file is scanned for changes.

1 Like