Constant high-cpu usage despite nothing is syncing up
DawidIzydor opened this issue · comments
I have around 274 GB onedrive/107k items synced using this tool.
Everything is up do date but still onedrive is using ~~8% of CPU (100% of one thread of a 6/12 CPU) constantly.
dawidizydor@dawidizydor-popos:~$ top
top - 01:35:49 up 16:24, 1 user, load average: 2.10, 2.32, 2.45
Tasks: 384 total, 2 running, 382 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.9 us, 4.5 sy, 10.0 ni, 83.7 id, 0.0 wa, 0.0 hi, 0.9 si, 0.0 st
MiB Mem : 32115.9 total, 10273.8 free, 4289.2 used, 17552.9 buff/cache
MiB Swap: 4095.5 total, 4092.0 free, 3.5 used. 27169.5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2910 dawidiz+ 25 5 858828 55412 13028 R 100.0 0.2 477:45.54 onedrive
Running on Pop!_OS 21.10
From quick debugging it seems onedrive gets stuck on ChangesUploader.uploadDifferences(Item)
as it is going through that 100k of files, despite there are no changes in them.
Is there any workaround possible to avoid this high CPU usage?
@DawidIzydor
What does onedrive --version
give as this information is lacking in your post
onedrive v1.1.4-2-g15b4730
Looking thorugh the code as of now to check for local changes onedrive looks through each and every of files to check their last modified date.
Couldn't it use something like find -cmin -600
instead (based of timestamp of last sync)? This executes in under a second on the same dataset
onedrive v1.1.4-2-g15b4730
OK - you will be hitting a known issue that has been fixed to do with the DB and indexes.
Also the 'skilion' client does not receive any support (reference) and contains issues / defects that put you at risk of data loss. Despite a new version release in Oct 2020, these defects remain. If you wish to use a client which is fully supported please refer to: https://github.com/abraunegg/onedrive
Major differences / Enhancements:
- Existing bugs with the 'skilion' client fixed
- File upload / download validation to ensure data integrity
- Support Real-Time syncing of remote updates via webhooks
- Supports Shared Folder support for OneDrive Personal and OneDrive Business accounts
- Supports SharePoint / Office365 Shared Libraries
- Supports Desktop notifications via libnotify
- Supports Dry-run capability to test configuration changes
- Prevent major OneDrive accidental data deletion after configuration change
- Supports National cloud deployments (Microsoft Cloud for US Government, Microsoft Cloud Germany, Azure and Office 365 operated by 21Vianet in China)
- Supports single & multi-tenanted applications
- Supports rate limiting of traffic
- Support for Docker
- Support for Podman
Suggest that you:
- Uninstall your current installed client then install from the OpenSuSE Build Service the correct package for your platform
- Make sure it is uninstalled and no 'onedrive' binary exists before you install the correct package - otherwise you will end up with 2 binaries in your search path ... the old and new .... which is not ideal
Thanks, this fixed the issue