I updated my NAS (a DS418Play, as detailed above) to DSM7.0-41890, hoping that would resolve the issues I have been experiencing with SMB shares from a Macintosh (running Big Sur 11.5). DSM7 has a much more up-to-date version of Samba (4.10.18) than used to be the case with DSM6.2 (4.4.16 at last count).
However if anything the problem is worse. Basically it seems that after a very short while a problem develops linked to the SMB cache. As above, once the problem occurs I can resolve it instantly by either clearing the SMB cache using the button within File Services->SMB->Advanced Settings->General, or restarting Samba from an SSH session.
For an example of what happens once the problem has started, if I simply try to save a file from Preview (specifically a PDF in my case, but I think this happens with other file types as well) to a SMB share on my NAS, Preview stalls with a beachball. Note that this does not happen until the share has been mounted for a while.
I imagine there is something that triggers it but if so I do not know what it is. It could simply be the length of time that the share has been mounted, or the number of files that have been saved to the share.
Another symptom once the problem occurs is that browsing from the Finder takes a long time to list files in folders.
If I either clear the SMB cache or restart Samba then these tasks complete instantly, and accessing files from the SMB share continues to be fast until the next time that the problem develops.
A workaround that I have employed is to create a scheduled job to restart Samba every 30 mins during work hours, and that seems to have resolved the issue for the moment, but I would prefer that Synology address this problem.
The task that needs to be created in the Task Scheduler is (DSM 7+)
For DSM 6.2 it is
This is very frustrating as it is the only thing that causes any issues with my Macintosh and Synology combination. At least I now know how to resolve it, but it is really annoying that I have to do so. As the fix involves clearing the SMB cache on the Synology box, I can only assume that it is almost certainly not a macOS issue as such.
I would be very grateful to hear whether others have experienced this issue, and whether my workaround resolves it for them.
However if anything the problem is worse. Basically it seems that after a very short while a problem develops linked to the SMB cache. As above, once the problem occurs I can resolve it instantly by either clearing the SMB cache using the button within File Services->SMB->Advanced Settings->General, or restarting Samba from an SSH session.
For an example of what happens once the problem has started, if I simply try to save a file from Preview (specifically a PDF in my case, but I think this happens with other file types as well) to a SMB share on my NAS, Preview stalls with a beachball. Note that this does not happen until the share has been mounted for a while.
I imagine there is something that triggers it but if so I do not know what it is. It could simply be the length of time that the share has been mounted, or the number of files that have been saved to the share.
Another symptom once the problem occurs is that browsing from the Finder takes a long time to list files in folders.
If I either clear the SMB cache or restart Samba then these tasks complete instantly, and accessing files from the SMB share continues to be fast until the next time that the problem develops.
A workaround that I have employed is to create a scheduled job to restart Samba every 30 mins during work hours, and that seems to have resolved the issue for the moment, but I would prefer that Synology address this problem.
The task that needs to be created in the Task Scheduler is (DSM 7+)
synosystemctl restart pkg-synosamba-smbd.service
, which needs to be run as root.For DSM 6.2 it is
/usr/syno/sbin/synoservice --restart samba
, again run as root.This is very frustrating as it is the only thing that causes any issues with my Macintosh and Synology combination. At least I now know how to resolve it, but it is really annoying that I have to do so. As the fix involves clearing the SMB cache on the Synology box, I can only assume that it is almost certainly not a macOS issue as such.
I would be very grateful to hear whether others have experienced this issue, and whether my workaround resolves it for them.