Giuseppe Lo Presti
2020-Oct-12 13:16 UTC
[Samba] Performance regression of Windows clients?
Hello Samba experts, I'd like to revive an old thread from 2017, where a performance regression of the Windows client implementation of SMB was discussed (https://lists.samba.org/archive/samba/2017-August/210366.html). We run a ctdb-managed cluster of Samba gateways to our distributed file system, and we have performed similar tests with the latest production Samba 4.12 release, using both Linux (cifs-utils 6.2-10) clients and Windows 10 native clients. Our synthetic test simply "touches" and subsequently removes 100 files. The network captures show Linux clients just performing the required operations, including `SMB2_FILE_INTERNAL_INFO` and `SMB2_FILE_BASIC_INFO` requests appearing exactly 100 times each, whereas Windows clients perform in addition several expensive `SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *` queries on the destination folder as well as on its parent (we counted 600+ such requests). The latter cause a remarkable performance loss, especially when the storage exposed via Samba is a network file system itself. As the mentioned thread seems to have been moved to the samba-technical mailing list, was there any conclusion reached? In particular, we?re looking for suggestions on possible reconfigurations (if any!) of our Windows clients, as we don?t expect the Samba server can do anything to mitigate this behaviour. Or in alternative, is there an alternative SMB client for Windows (if it is at all possible to replace the native one)? Thanks in advance for any suggestion on the topic and kind regards, Giuseppe -- Dr. Giuseppe Lo Presti CERN IT/Storage Geneva - Switzerland
On Mon, Oct 12, 2020 at 03:16:31PM +0200, Giuseppe Lo Presti via samba wrote:> Hello Samba experts, > > I'd like to revive an old thread from 2017, where a performance regression > of the Windows client implementation of SMB was discussed > (https://lists.samba.org/archive/samba/2017-August/210366.html). > > We run a ctdb-managed cluster of Samba gateways to our distributed file > system, and we have performed similar tests with the latest production Samba > 4.12 release, using both Linux (cifs-utils 6.2-10) clients and Windows 10 > native clients. > > Our synthetic test simply "touches" and subsequently removes 100 files. The > network captures show Linux clients just performing the required operations, > including `SMB2_FILE_INTERNAL_INFO` and `SMB2_FILE_BASIC_INFO` requests > appearing exactly 100 times each, whereas Windows clients perform in > addition several expensive `SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *` > queries on the destination folder as well as on its parent (we counted 600+ > such requests). The latter cause a remarkable performance loss, especially > when the storage exposed via Samba is a network file system itself. > > As the mentioned thread seems to have been moved to the samba-technical > mailing list, was there any conclusion reached? In particular, we?re looking > for suggestions on possible reconfigurations (if any!) of our Windows > clients, as we don?t expect the Samba server can do anything to mitigate > this behaviour. Or in alternative, is there an alternative SMB client for > Windows (if it is at all possible to replace the native one)?There is no alternate SMB client for Windows. However, how are you driving the deletion of files on the Windows side ? Are you using Powershell or the file manager GUI ? I'd guess a command line interface may do less of the extra calls (the ultimate is to try using the cygwin32 'rm -rf' command on a mounted drive, as that should be as close to Linux as you can get on Windows).
Giuseppe Lo Presti
2020-Oct-15 07:30 UTC
[Samba] Performance regression of Windows clients?
On 13/10/2020 23:00, Jeremy Allison wrote:> On Mon, Oct 12, 2020 at 03:16:31PM +0200, Giuseppe Lo Presti via samba wrote:[...]>> As the mentioned thread seems to have been moved to the samba-technical >> mailing list, was there any conclusion reached? In particular, we?re looking >> for suggestions on possible reconfigurations (if any!) of our Windows >> clients, as we don?t expect the Samba server can do anything to mitigate >> this behaviour. Or in alternative, is there an alternative SMB client for >> Windows (if it is at all possible to replace the native one)? > > There is no alternate SMB client for Windows. However, > how are you driving the deletion of files on the Windows > side ? > > Are you using Powershell or the file manager GUI ?Thanks for reaching out, I also suspected there's no alternate SMB client... We tried both the GUI, to be as close as possible to what users would do, and a Powershell script. Both behave the same. For the sake of it, I just tried to use the Linux SMB client within WSL2: but Windows does not support mounting CIFS that way, only via their own native client!> I'd guess a command line interface may do less of > the extra calls (the ultimate is to try using > the cygwin32 'rm -rf' command on a mounted drive, > as that should be as close to Linux as you can > get on Windows).This might be possible (though some early tests I did with cygwin weren't that promising), but ultimately our users just use the GUI, so that's the concern: we wouldn't be in a position to recommend users NOT to use the File Explorer in their daily work. Anyone knowing what happened at the time within samba-technical (if it can be disclosed)? Thanks, Giuseppe