Fabian Fritz
2018-Dec-07 05:40 UTC
[Samba] SMB2 leases slowing down shared access to files
Hi, we recently updated to Samba 4.9.2 (running on a Solaris 10 server). All our client machines are Windows 7 PCs. Since then however, we noticed that if one client opens an executable from a share and somebody else tries to copy that folder to their local PC, it takes an incredibly long time; Sometimes it doesn't work at all. Also, if somebody has an .xlsx-File open, other people have to wait for a long time as well or cannot open that file at all. Before the update, users just got a notification that somebody else had opened the spreadsheet and they could just choose to open it read-only and that worked fine. Investigating this, I first tried putting ".exe" in the "veto oplock files" list. After I also put dlls and everything the program accessed in there as well, I could copy the folder from a share much faster, as before. As this doesn't take care of the problems with Office documents, I tried setting "smb2 leases = no" instead. Immediately everything started working fast again. It also brought back the dialog window in Office, asking you if you want to have read-only access. It seems like files that have "LEASE(LWH)" as the lock type in smbstatus have this problem. I was surprised that smb2 leases seem to slow everything down, as the documentation suggests that you can expect a speedup from this. There were no obvious errors in the log file. Thanks, Fabian
Jeremy Allison
2018-Dec-07 19:01 UTC
[Samba] SMB2 leases slowing down shared access to files
On Fri, Dec 07, 2018 at 06:40:53AM +0100, Fabian Fritz via samba wrote:> Hi, > > we recently updated to Samba 4.9.2 (running on a Solaris 10 server). > All our client machines are Windows 7 PCs. Since then however, we > noticed that if one client opens an executable from a share and > somebody else tries to copy that folder to their local PC, it takes an > incredibly long time; Sometimes it doesn't work at all. > Also, if somebody has an .xlsx-File open, other people have to wait > for a long time as well or cannot open that file at all. Before the > update, users just got a notification that somebody else had opened > the spreadsheet and they could just choose to open it read-only and > that worked fine. > > Investigating this, I first tried putting ".exe" in the "veto oplock > files" list. After I also put dlls and everything the program accessed > in there as well, I could copy the folder from a share much faster, as > before. As this doesn't take care of the problems with Office > documents, I tried setting "smb2 leases = no" instead. Immediately > everything started working fast again. It also brought back the dialog > window in Office, asking you if you want to have read-only access. It > seems like files that have "LEASE(LWH)" as the lock type in smbstatus > have this problem. > > I was surprised that smb2 leases seem to slow everything down, as the > documentation suggests that you can expect a speedup from this. There > were no obvious errors in the log file.Leases are a big win for non-shared access (which is 90% of all file access). Shared access does slow down on first open as the server has to revoke the existing leases before clients can continue.
Possibly Parallel Threads
- oplocks, kernel oplocks, kernel share modes, .. - how it all works?
- Friendly Reminder: Would you please comment on my findings?
- Linux vs. Windows SMB buffering
- Friendly Reminder: Would you please comment on my findings?
- Detect dhclient leases file in centos