Repository navigation
Closed
Description
Expected behaviour
When I change one file, ownCloud should synchronise that file. CPU usage should stay low.
Actual behaviour
When I change one file, ownCloud starts to scan the sync folder and uses 100% of CPU for about some seconds. If you changed another file in the meantime it rescans right away and stays at 100% CPU for minutes. This is annoying if you keep editing files (which is not uncommon).
This did not happen in older clients (at least they were not keeping the CPU at 100% all the time).
Steps to reproduce
- Start OwnCloud client
- Edit a file in the sync folder
Server configuration
Operating system: Ubuntu 14.04
Web server: Apache
Database: MySQL
PHP version: 5.6
ownCloud version: 8.2.5
Storage backend: Files
Client configuration
Client version: 2.2.1
Operating system: (L)Ubuntu 14.04
OS language: DE
Installation path of client: /usr/bin/owncloud
Logs
- Output of
owncloud
06-15 13:44:26:513 0x22e2460 detected changes in paths: QSet("/folder/xxx.myfile")
06-15 13:44:26:513 0x22e2460 Schedule folder "ownCloud" to sync!
06-15 13:44:26:514 0x22e2460 Sync state changed for folder "https://url.xx/remote.php/webdav/" : "Not yet Started"
06-15 13:44:26:514 0x22e2460 void OCC::ServerNotificationHandler::slotFetchNotifications(OCC::AccountState*) Account "[email protected]" does not have notifications enabled.
06-15 13:44:26:514 0x22e2460 Scheduling a sync in 2 seconds
[...]
06-15 13:44:39:859 0x22e2460 No database Transaction to commit
06-15 13:44:39:878 0x22e2460 CSync run took 11355
- Web server error log: No errors
- ownCloud log (data/owncloud.log): No problem here
Activity
guruz commentedon Jun 15, 2016
@jabdoa2 This is interesting. We always rescan all paths if a single file changes and on startup, this is nothing that changed over the different versions.
How many files/folders do you have? It should not be at 100% for minutes, maybe for some seconds?
jabdoa2 commentedon Jun 15, 2016
Maybe it did it less efficient/less often before? As you see in the log it takes about 13s for one run. On this machine some folders are excluded. I got about 62k files to synchronise:
Since most IDEs autosave changes its not uncommon to always have a changed file in the folder which leads to the behaviour from above.
ogoffart commentedon Jun 15, 2016
If you don't enable any logging flags (which is also slowing down the sync),
most of the time during the discovery is spent in analysing the exclude list.
We indeed added a few entries to the exclude list.
jabdoa2 commentedon Jun 15, 2016
I always disabled the exclusion list in the client (because i want to synchronise dot files for example). As long as there are no hidden exclusions, it should be empty. System runs on a SSD and an i7 (mobile 2 cores + HT).
I noticed the issue because the fan of my notebook started to run permanently when I use my IDE to edit stuff. This did not happen before. Also it only happens when I edit stuff. Average system load is at about 2 and its mostly caused by the ownCloud client (it takes 2 out of 4 HT cores).
Instinct64 commentedon Jun 15, 2016
Windows 10 x64 - OwnCloud Client 2.2.1
I'm seeing similar behaviour, OwnCloud is regularly taking several minutes scanning and consuming ~18% CPU (Gen 6 i7), even when no files have changed. Once the scan is completed, it seems to wait for about ~30 seconds and then repeats the scan.
Our company uses OwnCloud for filesharing between clients and we have a few hundred folders in total. This is problematic for laptop users like myself for example, where constant background CPU drains battery very quickly.
patrickhafner commentedon Jun 16, 2016
OS X 10.11.5
ownCloud Client 2.2.1
ownCloud 8.2.5
Excessive CPU usage as well while scanning my sync folders for changes. The process is running at 100% CPU load on one core then. Hidden files won't sync.
You can see the high CPU usage twice in this graph (every time, ownCloud is looking for changes):

sagamusix commentedon Jun 16, 2016
I can also confirm that ownCloud almost constantly eats a whole CPU core here on Windows 7, and with a dual-core setup things get sluggish very quickly if some other application also does some CPU-intensive work. If you're not already doing so, the scan thread should probably work at one of the lowest possible thread priorities. Manually changing the entire process priority via Task Manager to something lower than default seems to make Windows more responsive again, so I guess that the client might not reduce the thread priority at the moment.
guruz commentedon Jun 17, 2016
@sagamusix @patrickhafner @Instinct64 Do you guys think the previous client versions were better in this regard?
Instinct64 commentedon Jun 17, 2016
I've reverted to 2.1.1 in order to test this. I see that OwnCloud only ramps up it's CPU usage for a few seconds, rather than the near continuous ~20% usage I see on my machine with 2.2.1.
FlorentCoppint commentedon Jun 17, 2016
Same issue as @Instinct64, client is using 100% of one core, stops a few minutes, then using 100% again...
dragotin commentedon Jun 17, 2016
@Instinct64 @FlorentCoppint do you use overlay icons in a file manager?
Instinct64 commentedon Jun 17, 2016
@dragotin Owncloud applies it's own overlay icons in Windows Explorer. I dont have any other apps applying overlay icons in the Owncloud folders.
24 remaining items
Setup csync logging earlier
ckamm commentedon Jun 21, 2016
@guruz Pull request to set up logging earlier: #4991
Setup csync logging earlier (#4991)
jabdoa2 commentedon Jun 21, 2016
I checked the file which are references above: /home/xxx/.local/share/data/ownCloud/sync-exclude.lst is indeed empty. However, /etc/ownCloud/sync-exclude.lst is not empty. Thus, I assume that my ignore list is also not empty.
Is that intended? I checked "Sync hidden files". Why is it still ignoring some files?
guruz commentedon Jun 21, 2016
Everyone: 2.2.2 will be released in the next hours. Please try with that.
@jabdoa2 it is probably ignoring the files because they are still in the exclude list?
jabdoa2 commentedon Jun 21, 2016
@guruz I restarted the client. What do you mean by "still in the exclude list"? I checked "Sync hidden files" to tell the client that it should sync everything. Also how should the client (runs as user) modify /etc/ownCloud/sync-exclude.lst which is owned by root? I don't understand why there is an additional exclude list which is apparently used but not displayed and cannot be changed/viewed by the user.
ckamm commentedon Jun 21, 2016
@jabdoa2 There is an extra exclude list that contains patterns like ".~" or "Thumbs.db" to skip files that people usually don't want to sync, even if they want to sync other hidden files. You can see and edit the list in General/Advanced/Edit Ignored Files.
sagamusix commentedon Jun 22, 2016
Using the nightly build linked above, ownCloud remains using up an entire core here. I am not entirely sure if it used to be like this in 2.1.1.
Instinct64 commentedon Jun 23, 2016
I've been trying ownCloud-2.2.2.6187-nightly20160620 (Windows) for the last couple days and it seems to have resolved the issue I was seeing.
patrickhafner commentedon Jun 24, 2016
The 2.2.2 Stable (build 3472), downloaded from official website is working for me on OS X as well. Thank you for this patch!
dragotin commentedon Jun 24, 2016
Kudos to @guruz and @ckamm - and everybody who tested :-)