Forum Discussion
OneDrive Client, Files on Demand and Syncing large libraries
There's a lot of good knowledge in this thread - keep them coming.
So basically, if you have a huge library with 1 million files you will probably run into problems. If you decided to split them into 20 of them with 50k each you will be better off. But if a user decides they need to sync (even though just on-demand) all 20 of them, the user will still run into problems because the total volume of files sync'ed on this particular user's computer is 1 million?
JonasBack indeed.
Microsoft says that OneDrive supports 100k files max (in one library) and 300K files max synced over different libraries.
My experience tells though that you should stay well below these limits in order to have proper syncing.
Of course giving users laptops with better CPUs/more memory (i7/16GB) also helps but this is is not a proper solution.
- jab365cloudFeb 25, 2020Steel ContributorYeah! Microsoft has finally updated their documentation regarding sync limit on February 21 and now confirm our problems!
"New OneDrive sync app - For optimum performance, we recommend storing no more than 300,000 files across all synced document libraries, even if you're using Files On-Demand or choosing only some folders within the libraries to sync."
https://docs.microsoft.com/en-us/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits - dustintadamFeb 19, 2020Iron Contributor
Couple other things we've discovered / are aware of:
depending on what article you're reading, you might see the words "file" or "objects" when discussing limits. In reality, the upper limits should always be discussed as objects. From the sync clients' perspective, a folder, as an "object", carries as much weight as a file when it comes to tracking things that can change. When calculating how much pressure is being placed on the client, its important to consider the count of folders in your tree as well as files, add those two together, and that's the object count you should be considering.
For example, on a test VM I can successfully sync content that totals 98,000 files stored in a tree that contains 100,000 folders. It's not super-performant, but in this scenario that's because I'm not syncing 98,000 files, I'm syncing 200,000 'objects'.
Permissions play a huge role in the sync clients performance as well, and often in ways that aren't obvious:
One of the things the OneDrive development team has been working on (they may have fixed this already, but I tend to think not) is the notion of a "Sync Root"; essentially, at the moment, sync can only be initiated from the root of a document library. How this manifests is that even if you tell a user to sync a subfolder, if they still have permissions to content higher in the tree, the sync client will still download and track all the objects in the library the user has access to behind the scenes, even if it's not being presented on disk in Explorer. The overhead isn't as high, but it does add up. The goal is to allow SharePoint to set a per-user custom Sync Root at any level in a library so that the sync context is scoped to only the level at which the content is synced from.
You can help improve that by using the "Restricted View" SharePoint permission. This is a special permission level that has been around since the old Groove client, and is designed to prevent content sync. By setting Restricted View on a parent folder, but granting Edit on child content, you can essentially create online-only content that can't be synced, and the kicker is that the Sync Client wont download anything under that parent folder to its local manifest, helping reduce load significantly. This helps keep content in the same library for business or process continuity.
Its also helpful to enable the 'PermitDisablePermissionInheritance' GPO switch if you are using Read Only permissions and Sync, as without this the OneDrive client is exceptionally slow to sync content if Read Only is used anywhere in the tree being synced.
https://docs.microsoft.com/en-us/onedrive/use-group-policy#PermitDisablePermissionInheritance