Nuxeo Drive for Mac uses 100% CPU
Nuxeo Drive for Mac uses 100% CPU all the time, consuming rapidly my battery, what can be done to minimize the CPU activity?
Hi,
I imagine that you have a lot of files in your Nuxeo Drive folder. This is a known issue tracked by https://jira.nuxeo.com/browse/NXP-10951 on which we have planned to work at the beginning of next year: for now the client spends a lot of time scanning the file system to detect changes, whereas it should use a notification mechanism to get informed of the actual changes, which would obviously eat less CPU and battery.
As a workaround you can:
- Try to minimize the volume of synchronized folders / files (maybe by making a more granular choice of the synchronized folders at a lower level in the document hierarchy).
- Launch Drive with:
- A big (let's say infinite)
max-sync-step
: this is the number of documents to synchronize before refereshing the local DB, remotely and locally, so if you set this parameter as large enough to cover the total number of local files / folders, Drive will synchronize all of them before doing a local scan. The default value is 10. - A bigger
delay
: this is the delay in seconds between consecutive sync operations, to lower the frequency of local scans. Default value is 5 seconds.
You will need to use the command line for this, for instance:
ndrive --max-sync-step=1000000 --delay=60
Hope this helps.
I started Nuxeo Drive in the regular way via Finder > Open > Nuxeo Drive
The Nuxeo Drive contains about 10 workspaces with a total of 1.2 GB of files. Since the Dropbox client does not use any (or just 0,3%) CPU at all, I assume they're using a different algorithm to determine whether files have changed or not?
(Using the command line params as mentioned solves the problem and puts it to 2,7% CPU, however, I thought the issue would be gone in the current Nuxeo Drive version 2.1.1130 since the Jira issue was solved in 2014.)
Hi.
I have the same problem, and the settings provided do really bring the CPU usage down.
However, the way it is being instructed to launch the application locks a Terminal window while the application is running. It only returns to the prompt when you quit the nuxeo-drive App… and if you close the Terminal window, the application dies.
An alternative way to launch the application with arguments, and not holding a Terminal window, is:
open -a /Applications/Nuxeo\ Drive.app --args --max-sync-step=1000000 --delay=60
Nevertheless, I would prefer that the application would not refresh/reset the file ~/LIbrary/LaunchAgents/org.nuxeo.drive.plist
every time it is (re)started and could enable the setting of these startup parameters (and others) in it, like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.nuxeo.drive.agentlauncher</string>
<key>RunAtLoad</key>
<true/>
<key>Program</key>
<string>/Applications/Nuxeo Drive.app/Contents/MacOS/Nuxeo Drive</string>
<key>ProgramArguments</key>
<array>
<string>--max-sync-step=1000000</string>
<string>--delay=60</string>
</array>
</dict>
</plist>
Thanks for the info.
Thanks for this information.
Indeed the right way to launch Nuxeo Drive without locking a Terminal window is to use the open command.
I agree on both points that:
1/ The application should not systematically reset the launch agent at startup. This has just been fixed in https://jira.nuxeo.com/browse/NXP-13677 and is available in the last successful build, downloadable from Jenkins.
2/ The commandline options such as –max-sync-step and –delay should be propagated to the launch agent. Created https://jira.nuxeo.com/browse/NXP-13678 to track this improvement.
Cheers