awl1
2017-Aug-18 21:35 UTC
[Samba] Friendly Reminder: Would you please comment on my findings?
Am 18.08.2017 um 23:17 schrieb Jeremy Allison via samba:> This might be hidden against Windows due to directory handle leases, > which we don't yet support.Are you saying that when I replace the Samba server by a Windows SMB2 share server, I should see better performance? I can perfectly test that out and record a Wireshark trace for this if you like... Layperson question: Would such a "directory handle lease" be something like a cache for SMB2 Find responses? This would have to be a client-side cache in order to avoid sending back all 1000 file names in the directory from server to client over the network with every single response. Also, in case it indeed were a client-side cache, this cache would also need to be silently concurrently updated with every Create request/response cycle, because the number of files in the server-side directory always grows by the one file just written between one call to SMB2_FIND_ID_BOTH_DIRECTORY_INFO and the next... Thanks & best regards Andreas
Jeremy Allison
2017-Aug-18 21:42 UTC
[Samba] Friendly Reminder: Would you please comment on my findings?
On Fri, Aug 18, 2017 at 11:35:04PM +0200, awl1 wrote:> Am 18.08.2017 um 23:17 schrieb Jeremy Allison via samba: > >This might be hidden against Windows due to directory handle > >leases, which we don't yet support. > Are you saying that when I replace the Samba server by a Windows > SMB2 share server, I should see better performance? I can perfectly > test that out and record a Wireshark trace for this if you like...Yes, that would be my guess.> Layperson question: Would such a "directory handle lease" be > something like a cache for SMB2 Find responses? > > This would have to be a client-side cache in order to avoid sending > back all 1000 file names in the directory from server to client over > the network with every single response. > > Also, in case it indeed were a client-side cache, this cache would > also need to be silently concurrently updated with every Create > request/response cycle, because the number of files in the > server-side directory always grows by the one file just written > between one call to SMB2_FIND_ID_BOTH_DIRECTORY_INFO and the next...That's exactly what directory handle leases are. They're oplocks for directories.
awl1
2017-Aug-18 21:57 UTC
[Samba] Friendly Reminder: Would you please comment on my findings?
Ah, ok, "directory handle leases"... Ouch, I see... :-( In this case, I will first repeat my test scenario with a Windows SMB2 server and report back here. Based on the results of this exercise, you can then advise whether you still want to move this to smb-technical and raise this with Microsoft folks (who still might have a simple workaround "fix" to improve their SMB2 client performance with a Samba server that does not [yet] implement directory handle leases), or whether the only way to fix this (on the long run, I am perfectly aware that this is a hugely complex task) will be implementing those infamous "directory handle leases" in Samba... ;-) Many thanks so far for the progress we made today - I'll call it a day for today now (close to midnight over here), and get back once I have the Wireshark recordings of the Windows SMB2 share server... Best regards Andreas Am 18.08.2017 um 23:42 schrieb Jeremy Allison:> On Fri, Aug 18, 2017 at 11:35:04PM +0200, awl1 wrote: >> Am 18.08.2017 um 23:17 schrieb Jeremy Allison via samba: >>> This might be hidden against Windows due to directory handle >>> leases, which we don't yet support. >> Are you saying that when I replace the Samba server by a Windows >> SMB2 share server, I should see better performance? I can perfectly >> test that out and record a Wireshark trace for this if you like... > Yes, that would be my guess. > >> Layperson question: Would such a "directory handle lease" be >> something like a cache for SMB2 Find responses? >> >> This would have to be a client-side cache in order to avoid sending >> back all 1000 file names in the directory from server to client over >> the network with every single response. >> >> Also, in case it indeed were a client-side cache, this cache would >> also need to be silently concurrently updated with every Create >> request/response cycle, because the number of files in the >> server-side directory always grows by the one file just written >> between one call to SMB2_FIND_ID_BOTH_DIRECTORY_INFO and the next... > That's exactly what directory handle leases are. They're > oplocks for directories.
Reasonably Related Threads
- Friendly Reminder: Would you please comment on my findings?
- Friendly Reminder: Would you please comment on my findings?
- Windows SMB2 client doing excessive, inefficient SMB2 Find (and other) requests
- Friendly Reminder: Would you please comment on my findings?
- Friendly Reminder: Would you please comment on my findings?