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

occ files:scan's memory consumption grows with amount of files scanned #19115

Closed
danimo opened this issue Sep 17, 2015 · 5 comments
Closed

occ files:scan's memory consumption grows with amount of files scanned #19115

danimo opened this issue Sep 17, 2015 · 5 comments
Labels

Comments

@danimo
Copy link
Contributor

danimo commented Sep 17, 2015

Expected behavior

The memory consumption of the scanner is constant.

Actual behavior

The memory consumption of the scanner grows with the amount of files, requiring to increase the memory limit again and again for users with a large amount of data.

Details

ownCloud: 8.1.3
Total amount of file in user's share: 45308
Memory required: > 256 MB, < 512 MB

@karlitschek
Copy link
Contributor

@icewind1991

@oparoz
Copy link
Contributor

oparoz commented Oct 3, 2015

It's by design #10922.
All the information is collected first, before being sent to the database, in order to speed up the process.
So the solution seems to be to give large amounts of memory (in the GB range) to the cli.

Note: Scanned folders are unavailable while the command runs

@oparoz
Copy link
Contributor

oparoz commented Oct 3, 2015

I see one possible enhancement: Collect structure data first and launch non-recursive scans from the bottom of the tree. Each folder update will be committed separately.

@PVince81
Copy link
Contributor

PVince81 commented Mar 3, 2016

This could be due to stat caches.

When scanning a local storage, PHP will store stuff in its stat cache. Not sure if that one is capped.

Regarding SMB, we added a cap to the stat cache recently: #21648

If this is still happening in 8.2.2 or 9.0 RC1, please reopen.

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants