-
-
Notifications
You must be signed in to change notification settings - Fork 872
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
Reduce scanning of local filesystem needlessly every sync in monitor mode #433
Conversation
* Reduce scanning the entire local system in monitor mode for local changes
* Separate out 'scanForDifferences' monitor & downloadOnly check
Hmmm, but if an upload triggered due to inotify doesn't work, eg because offline, when will the files be uploaded? |
Good point ... What about some how scanning the local FS once at startup and then if 'detected been offline' ? |
Or even a full scan every X hours ? scanning EVERY (by default) 45 seconds a full path walk to me is rather excessive ... |
I would go for both: Setting a dirty bit in the inotify handler and doing a full scan if that is set, plus every N (60? 100? Option) sync runs a full sync. We have already a counter variable for the number of syncs (log frequency) that could be reused. WDYT? |
* Add 'monitor_fullscan_frequency' to set the freqency of performing a full disk scan when in monitor mode
@norbusan
|
@norbusan |
Fine with me. Strange enough GH says that it cannot rebase the conflicts, while master is already merged in ... it should not rebase, it should simply merge which is actually a fast-forward merge. |
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. |
Reduce scanning the entire local system in monitor mode for local changes
After performing all the DB sync fixes, there is still excessive CPU in monitor mode when performing this scan:
This is due to scanning the entire sync_dir path for any changes.
This scan is excessing and needless, as the sync_dir path, in monitor mode, is already being monitored by
inotify
for any local changes, thus we should not need to scan the entire path / tree for changes, as they would have already been captured.Example: a 35 sec 100% CPU load when 'scanning' for local changes with 50K files / folders
With the proposed patch - zero extra CPU load:
Thoughts?