Odrive (Mac) eating my CPU

odrive (prod 6302) is consuming huge CPU resources.
It’s not even pink or spinning, just sitting there all grey.
Why?

Hi @Zero_G,
Is the CPu use constant, or periodic? Can you send a diagnostic from the odrive menu?

It’s 125%+ for at least 15 mins or more at a time.
Sending diagnostic now.
thanks

Hi @Zero_G,
odrive’s periodic scans and start-up scans can consume a good amount of CPU. During those times, odrive is doing a full scan of all of your exposed content. The diagnostic reports that you have about 1400 folders in scope, so this is a good amount of remote and local scanning that needs to be done for a full scan. Along the way, if odrive encounters sections that need to be further processed (added files, changed files, etc), it can prolong the total time as odrive syncs those changes.

The diagnostic you sent looks like you may have recently done a restart, and the start-up scan was about 5 minutes in, having picked up several changes along the way.

CPU use is something we are very sensitive to in the forthcoming version, and you can expect much better behavior in this area.

You can reduce the overhead by reducing the scope that odrive has to keep in sync by unsyning folders that you may not need immediate access to.

I’ve left odrive running for a few days, trying to complete the sync (no files, just folders) of my Google Drive, but it’s not happening. This was from a new, fresh odrive folder and fresh install. Granted there’s literally millions of items in my G Drive, but …

  1. The menubar icon keeps becoming unresponsive; it is animated, but there is no dropdown.
  2. I tried that python script you sent me in another thread, but it fails after a few thousand .cloudf expansions
  3. odrive CPU usage is still over 100% after >12 hours running
  4. I cannot “stop” the sync of my local G Drive root folder (i.e., the context menu always says “Stop”, never “Sync”)

Is there any way to make odrive “forget” what it was in process of syncing and ONLY sync folders I manually tell it to? Something in .odrive ?

Thanks

Hi @Zero_G,
It sounds like it is busy going through things. You can turn off automatic sync (under the first item in the odrive menu). This will stop things from automatically uploading and downloading, but you can still manually download with double-click and right-click actions.

It sounds like you are dealing with lots and lots of folders. When you say the script fails, can you tell me what that means?

What does running “status” from the CLI show you that odrive is doing?

status

isActivated: True                                               hasSession: True
email: z_____@gmail.com                                      accountType: Google
syncEnabled: True                                                   version: 612
placeholderThreshold: neverDownload                   autoUnsyncThreshold: never
downloadThrottlingThreshold: unlimited         uploadThrottlingThreshold: normal
autoTrashThreshold: never                                              Mounts: 1
xlThreshold: never                                                    Backups: 0

Sync Requests: 0
Background Requests: 0
Uploads: 0
Downloads: 0
Trash: 0
Waiting: 0
Not Allowed: 0

The thing is, I can’t stop the automatic sync. Whether I do so from menubar, or from right-click, there are some folders that just will not stop. For days.

The script fails after a few hours with messages like Unable to sync … and the menubar is unresponsive, I have to force-quit from Activity Monitor.

Thanks for the reply @Zero_G.

Can you run this command from the terminal and tell me what it spits out?

odrive_folder="$HOME/odrive";printf "\n\n# of folders: $(find "$odrive_folder" -type d | wc -l)\n# of files $(find "$odrive_folder" -type f | wc -l)\n\n"

The above command assumes that the odrive folder is in the default location, so please change it if that is not the case.

# of folders:        86200
# of files          938676

also

# of .cloudf items    8487

If I count only in my odrive/Google Drive folder (which is the one that fails to sync):

# of folders:        59292
# of files          763678
# of .cloudf items    8247

Hi @Zero_G,
You are probably starting to run into some scale limitations of odrive. odrive is tracking over 1 million objects for sync, which creates quite a bit of overhead. Scale like this is something we are working on improving, but it is always going to be a factor because of the sheer amount of data that needs to be kept in sync.

Do you need to have all of your folders in Google Drive synced or is it possible to prune by unsyncing certain sections?

What is your ultimate goal on this system?

I recently migrated a bunch of stuff from various cloud storage all into my Google Drive.
I was hoping to use odrive to compare & index, make sure everything migrated correctly etc.

I supposed I could break it down and do only some folders at a time, but that would be a lot of extra work.

(I don’t need any actual files synced, just the folders & placeholders.)

Hi @Zero_G,
Thanks for the explanation. Do things still progress for a while after you restart?

Depending on how you have things setup, you could modify the script to tackle a subfolder in the root of the drive at a time, index, unsync, and move on to the next . I may be able to help write up something simple, if you want to try.