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

large repo + diskUsage calc timesout systemd unit #6741

Closed
elitak opened this issue Nov 1, 2019 · 3 comments · Fixed by #8040
Closed

large repo + diskUsage calc timesout systemd unit #6741

elitak opened this issue Nov 1, 2019 · 3 comments · Fixed by #8040
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature

Comments

@elitak
Copy link

elitak commented Nov 1, 2019

Version information:

go-ipfs version: 0.4.22-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.9
Please check dist.ipfs.io for a newer version of go-ipfs and update if necessary. Report back if the problem persists.

Description:

I have a very large repo (10TB+ on XFS). Sometimes (I don't know the interval), ipfs-daemon decides it needs to refresh the blocks/diskUsage.cache file on startup, and takes so long computing the new usage, that systemd thinks the service has failed to start and kills the process. How can I disable the recalculation or make it run only after the daemon has started up, in a background thread?

@elitak elitak added the kind/bug A bug in existing code (including security flaws) label Nov 1, 2019
@Stebalien
Copy link
Member

At the moment, the only way to do this is to use badger (not flatfs). This can happen when we fail to persist the disk usage file on close (e.g., we crash).

Note: we currently abort trying to calculate the size after 5 minutes. You might want to consider increasing your systemd service start timeout.

Alternatively, if you have some time, I'd love a patch that calculates the disk usage in the background. IIRC, we don't do this as it's difficult to impossible to get a consistent snapshot of the datastore size while it's open for writing.

@Stebalien Stebalien added kind/enhancement A net-new feature or improvement to an existing feature kind/bug A bug in existing code (including security flaws) and removed kind/bug A bug in existing code (including security flaws) labels Nov 1, 2019
@elitak
Copy link
Author

elitak commented Nov 2, 2019

Where in the code is the check and the 5m timeout? I'd rather just patch that for now.

@Stebalien
Copy link
Member

Stebalien commented Nov 3, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants