[Samba] Slow syncing of offline files
miguel medalha
medalist at sapo.pt
Tue Mar 4 11:56:58 UTC 2025
I came across this article from Microsoft that explains the slow synching
behavior of offline files that I have been observing:
Sync Center: Slow syncing of offline files on some file servers
https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directo
ry/sync-center-slow-syncing-of-offline-files
<
Summary
When Microsoft Sync Center syncs offline files, the sync operation may take
longer than expected. This behavior occurs when the back-end file server
enumerates unsorted directory contents (a list in which the file names are
not sorted alphabetically). This affects Microsoft Sync Center performance
when it syncs offline files with non-Microsoft file servers.
More information
Microsoft Sync Center compares the local system's directory list against a
list of files that it receives from the remote file server. Sync Center does
this by making query directory calls against the remote file server through
the Server Message Block protocol (CIFS, SMB, SMB2, and SMB3). Microsoft
file servers always return query directory results in alphabetical order,
sorted by file name. (The underlying NTFS file system maintains sorted
lists.)
Many underlying file systems do not maintain sorted lists. This includes the
file systems that are used by most third-party SMB protocol implementers and
Microsoft file systems such as FAT32. Therefore, most third-party file
servers exhibit performance delays when they sync offline files by using
Sync Center.
>
This is becoming more relevant due to the use of NVMe storage on desktop
clients. Even with a 10Gb network link the maximum throughput that can be
expected is around 1 Gigabyte/s, whereas local NVMe storage can reach 6
Gigabytes/s and even more. The only way to benefit from such speeds is
through the use of Windows Offline Files, which frankly doesn't work very
well, at least with a Samba server...
So I thought that maybe using the Samba VFS module "dirsort" would improve
the synching performance. Will the performance penalty incurred by sorting
directory listings be compensated for by the more efficient synching of the
users' profiles? I am going to try and use it in the user profiles share.
Does anyone here have some experience with this or anything to say about it?
Thank you.
More information about the samba
mailing list