Why is Google Drive so heavy on my CPU?
As the below screenshot shows, despite the fact that Google drive doesn't appear to be doing anything (it's not syncing any data) it's using over 12% of my CPU (a core i7).
The official documentation states:
Depending on your network connection and computer preferences, Google Drive may consume a large amount of CPU to complete its initial sync.
However it has been installed for over a month now and doesn't have anything new to sync. Why, then, does it use so much of my CPU?
There is no question that this is a bug. The drive sync process somehow enters a state where the CPU activity is at maximum for the process. If you kill the drive sync process and restart it, the sync process usage will return to idle levels.
This is definitely not an initial sync problem. I have a personal folder sync'd to Drive from a single machine with no other users having write access to the account. The Google Drive systray application on Win7 x64 consumes large amounts of CPU in this scenario even when files haven't been modified for days. It also re-syncs files that have not been touched in weeks. The local modified date from NTFS says weeks ago for those files.
Simply put, Google Drive's change detection mechanisms are extremely inefficient and under-evolved compared to Dropbox and OneDrive. They should be event driven for local changes (Win32 API can event drive change notifications for local file changes rather than polling for example). Remote changes should use PUSH if possible rather than polling as well.
File permission issues should be gracefully handled (e.g. ACCESS IS DENIED shouldn't make Drive spin CPU like crazy).
EDIT 1: in my case, Google Drive was taking a lot of the CPU because I added 600'000+ (yes, more than six hundred thousand) files to my google folder in one time.
EDIT 2: after using it for about a year, I can safely say that I do NOT recommend using Google Drive. I am still regularly having issues synchronizing my files. Often the whole synchronization process simply stops & sometimes some files are re-added to my Google Drive folder. I might even have missed some other issues. I simply hope it did not delete any sensitive files.
How I fixed it:
Note: you might want to back up your file to an external drive before doing this.
On my computer: I zipped the relevant folders, and removed the unzipped version of these folders afterwards. From Google Drive online directly: I even removed the unzipped version of these folders via the Google Drive online web app, hoping it'd unload some work from the Google Drive app (not sure it whether it had a positive effect or not).
It then took a few tries to Google Drive to come back to a regular state but it seems like everything is good now (a few days later... after Google Drive app struggled to sync & even crashed a couple of times). Be patient, it might take it a long time to figure out "what the hell is going on".
Original answer:
Just got a 1TB Google Drive plan.
After uploading 140+ GB and working just fine, it is now going totally nuts: 88% of my CPU is being used... and it freezes my computer at some point.
I suspect it could be because I added a lot of file recently, from programming projects. Which means LOTS of files, all being quite small, some are extremely small.