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
Am 10/15/20 um 9:30 AM schrieb Giuseppe Lo Presti via samba:> Anyone knowing what happened at the time within samba-technical (if it > can be disclosed)?iirc I tried to look into this offlist with the OP and actually spent considerable time back then trying to reproduce the issue, but couldn't. I can't find the whole thread in my mail archives, only some of my responses and it seems the whole thing went nowwhere. Generally, Windows Explorer in combination with WIndows kernel SMB VFS is quite good at not generating excessive SMB traffic, so I'm a bit surprised about that pattern you're describing. I don't have the spare time to look into your problem, sorry. If you have the options, you may want to consider using dedicated support: <https://www.samba.org/samba/support/globalsupport.html> Cheerio! -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20201015/5ae61369/signature.sig>
Giuseppe Lo Presti
2020-Oct-15 09:01 UTC
[Samba] Performance regression of Windows clients?
On 15/10/2020 09:46, Ralph Boehme wrote:> Am 10/15/20 um 9:30 AM schrieb Giuseppe Lo Presti via samba: >> Anyone knowing what happened at the time within samba-technical (if it >> can be disclosed)? > > iirc I tried to look into this offlist with the OP and actually spent > considerable time back then trying to reproduce the issue, but couldn't. > > I can't find the whole thread in my mail archives, only some of my > responses and it seems the whole thing went nowwhere. > > Generally, Windows Explorer in combination with WIndows kernel SMB VFS > is quite good at not generating excessive SMB traffic, so I'm a bit > surprised about that pattern you're describing.Hello Ralph, Thanks for having had a look. For the reproducibility, it should be fairly straightforward with a Powershell script as posted at the bottom, and either simply strace smbd (just count how many accesses are executed per file), or use wireshark as it understands the SMB protocol. Then compare this with the same actions performed via bash over a CIFS-mounted path. We ran the tests with a standalone non-clustered samba (AD member, no DC functionality), and we used a local folder on the server, nothing else (in particular not a networked file system). I'm posting this for completeness in case anyone has time/interest to look into it.> I don't have the spare time to look into your problem, sorry. If you > have the options, you may want to consider using dedicated support: > > <https://www.samba.org/samba/support/globalsupport.html>Thanks for the pointer, we might consider this in the future. Cheers, Giuseppe ---- # PowerShell script to touch and remove 100 files # # parameter: target directory (which must exist) param( [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()]$path ) # first touch the files $duration = Measure-Command { 1..100 | ForEach-Object { New-Item -Path $path -Name "test.$_" -ItemType File -Force } } $touchtime_ms = [math]::Round($duration.TotalMilliseconds) # then remove them $duration = Measure-Command {Remove-Item -Path $path\* -Force} $rmtime_ms = [math]::Round($duration.TotalMilliseconds) Write-Host "Touch time: $touchtime_ms" Write-Host "Remove time: $rmtime_ms"