Forum Discussion
OneDrive Client, Files on Demand and Syncing large libraries
Any new updates on this topic? I have a Document Library with about 115,000 files in it and our users are having problems with the OneDrive sync getting stuck on "processing changes". Sometimes I can do a OneDrive reset, but other times it doesn't work. We're well under the 300k file limit.
Nothing major that will simply "solve" the problem unfortunately.
Couple questions:
What Client version are your users running?
Does the library contain folders with broken inheritance?
How many users are syncing the library simultaneously?
Does the library have a high rate of change? (i.e. lots of files being modified in many different folders) or is it a lot of old static content?
- Joe McGowanAug 17, 2020Iron Contributor
The latest Production ring client: 20.134.0705.0008
No broken inheritance.
Around 5-10 users syncing at the same time.
Yes, high rate of change.
I gave myself permissions and started syncing the library and I'm having similar issues. So I don't think its machine related. I can't even reset OneDrive now, it gives an error that is couldn't shut down OneDrive.
- dustintadamAug 17, 2020Iron Contributor
Its likely the rate of change that's causing you the most problems. Every time something changes (especially in a file copy scenario), OneDrive has to re-scan everything that's on disk to ensure that it hasn't lost a file somewhere (i.e. "Was this thing renamed? or was it moved? or both?"). When multiple machines are moving a lot around, it exponentially increases the local demand on each individual machine. The only way to alleviate this is to break up the content across multiple libraries. Do all 100,000+ files need to all be in the same library? do they have to all be brought down locally? if you are lucky enough to answer no to both of those questions, the solution is simple: break up the content into smaller libraries and make stale data online-only (disable sync through in the library settings).
Unfortunately, this isn't exactly OneDrive's fault, Windows still has no mechanism where an app could simply subscribe to a subsystem and say "tell me anytime something changes on disk, including all the context". That leaves it with no other alternative than to literally go searching the disk every time anything updates to make sure it hasn't lost anything... but if it gets overwhelmed with too many changes it simply cant keep up.
- John TwohigAug 18, 2020Iron Contributor
I think you asked two key questions: "Do all 100,000+ files need to all be in the same library? do they have to all be brought down locally?"
Even though cloud storage seems nearly free nowadays documents still need to be organized. They still have a lifecycle. I suspect that it is pretty rare that many groups in a company will need access to 100,000 documents this month or this year. If things are organized then each group only needs to sync a smaller number of current document libraries. Put the old stuff in archive libraries and use the web browser where you can use the SharePoint search.
I can think of almost no cases where people would need to bring down 100,000 files locally. You only need them locally if you aren't connected to the internet and, in today's world, most of us are seldom without internet. And, if you are somewhere where good internet isn't widely available, trying to sync 100,000 files locally is probably a lost cause.
The thing that gets me most about syncing locally is the security risk. If all these files "must" be synced locally then one would assume they are important. If you have dozens of people syncing all these files to their laptops then there is a good chance that, sooner or later, one will be lost or stolen. Once someone has physical possession of the laptop you have to assume that they will have access to all the files on it. If there is anything sensitive or juicy there you have to be prepared to see it in the news.
There are a few things I found that help:
- I tell our people to always have Files on Demand turned on. It reduces the security risk, network traffic, and CPU usage.
- Turn on Storage Sense. We tend to use the same files over and over again and then work on different ones for a while. With appropriate settings for Storage Sense and Files on Demand turned on you can reduce security risk and still almost always have the files you want local. Besides some people never check their C: Drives and then start having problems when it fills up.
- Don't use special characters other than - or _ in filenames. At some point you will encounter some application that doesn't like it. I had one person who's OneDrive always said "processing" It turned out he liked to use ~ in filenames and the OneDrive client didn't like that. That can also happen if Windows itself puts a ~temp file in a folder that is synced.