Skip to content

restic stats is unreasonably slow in comparison to other operations #2126

@cdhowie

Description

@cdhowie

Output of restic version

restic 0.9.3 compiled with go1.11.1 on linux/amd64

How did you run restic exactly?

restic stats --mode restore-size

What backend/server/service did you use to store the repository?

Local disk.

Expected behavior

This mode should take no longer than the part of restic prune that finds unused objects (about 15-20 minutes on this repository).

Actual behavior

This analysis takes multiple hours.

Do you have any idea what may have caused this?

My suspicion was that, while restic prune's unused-object discovery mechanism prunes trees that have already been marked as used, restic stats on the other hand did not prune any subtrees and therefore has to recompute the size of each tree each time it is encountered.

However, looking through the source code, it seems that this is attempted? Perhaps this code is not functioning correctly?

Do you have an idea how to solve the issue?

Not without digging into the source code more.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions