Berend Tober
2007-Jun-13 15:57 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba
The first time a Word or Excel file is opened, i.e., when either Word or Excel have not been actively running "recently" (like, say for several minutes or more), the time it takes to start the application and load the file seem inordinately long. Once the first evolution is complete, files open more-or-less instantly if I close the first document but leave either app running (but void of any open documents). This pertains to the same file opened a second time, or different files -- once Word/Excel has done whatever it is thats takes so long for initial start up, then load performance is acceptable (in fact it is very impressive!). And it is not merely the loading of the app, because it happens both when I start the apps implicitly by double-clicking on a document in Windows Explorer, but also if I first start Word/Excel explicitly from the START menu without a specific document and then open one from the Samba share using File|Open. Envirnoment: Server is RHEL 5 with Samba version samba-3.0.23c-2.el5.2.0.2 Desktops are XP Pro SP2 on some, and XP Home SP2 on others. MS Office Suite is XP Pro (i.e., Word/Excel 2002) Desktops also run Symantec Corporate Edition 8.1 (although same problem continues on a machine from which I uninstalled that as part of my debugging.) I initially had no explicit settings regarding opportunistic locking in smb.conf, but I've tried server different configurations without improvement. What appears below is the current configuration and the problem still pertains. smb.conf: [global] workgroup = mygroup server string = Samba Server hosts allow = 192.168.123. 127. cups options = raw log file = /var/log/samba/%m.log max log size = 50 dns proxy = no username map = /etc/samba/smbusers case sensitive = no kernel oplocks = no [homes] comment browseable = no writeable = yes [acct] path = /usr/local/var/samba/acct writeable = yes guest ok = yes browseable = no create mask = 0765 directory mask = 0775 oplocks = False level2 oplocks = False [engr] path = /usr/local/var/samba/engr writeable = yes browseable = no guest ok = yes create mask = 0765 directory mask = 0775 oplocks = False level2 oplocks = False Active Directory is not used. All workstations (about 25) simply map drive letters locally. This performance problem appeared only after we began using Samba for file server. Never saw this in close to 15 years of using Netware -- so I suspect it is not purely an MS-Office problem, but something to do with the interaction between MS-Office and Samba. I eagerly await your help!
Alex Crow
2007-Jun-13 16:06 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba
Berend, This wasn't a migration from an NT domain was it? We had the problem after a migration that starting up Office programs was incredibly slow - it turned out there were a load of Office registry entries pointing to UNC paths on the old Windows PDC. Just an idea... Cheers Alex
Aaron Kincer
2007-Jun-13 16:13 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba
My first question would be does this happen with other applications or strictly Office? Do you get the same behavior if you attempt to open a .doc file with Open Office? Second, have you watched your samba logs in real time (example: tail -f /var/log/samba/<your_pc_log>) as you try to open a file to see what's happening behind the scenes? Lastly, I'm not sure what happens when you use true or false as a value for oplocks and level2 oplocks, but I thought the values were either yes or no. Berend Tober wrote:> The first time a Word or Excel file is opened, i.e., when either Word > or Excel have not been actively running "recently" (like, say for > several minutes or more), the time it takes to start the application > and load the file seem inordinately long. > > Once the first evolution is complete, files open more-or-less > instantly if I close the first document but leave either app running > (but void of any open documents). This pertains to the same file > opened a second time, or different files -- once Word/Excel has done > whatever it is thats takes so long for initial start up, then load > performance is acceptable (in fact it is very impressive!). > > And it is not merely the loading of the app, because it happens both > when I start the apps implicitly by double-clicking on a document in > Windows Explorer, but also if I first start Word/Excel explicitly from > the START menu without a specific document and then open one from the > Samba share using File|Open. > > Envirnoment: > > Server is RHEL 5 with Samba version samba-3.0.23c-2.el5.2.0.2 > > Desktops are XP Pro SP2 on some, and XP Home SP2 on others. > > MS Office Suite is XP Pro (i.e., Word/Excel 2002) > > Desktops also run Symantec Corporate Edition 8.1 (although same > problem continues on a machine from which I uninstalled that as part > of my debugging.) > > I initially had no explicit settings regarding opportunistic locking > in smb.conf, but I've tried server different configurations without > improvement. What appears below is the current configuration and the > problem still pertains. > > > smb.conf: > > [global] > workgroup = mygroup > server string = Samba Server > hosts allow = 192.168.123. 127. > cups options = raw > log file = /var/log/samba/%m.log > max log size = 50 > dns proxy = no > username map = /etc/samba/smbusers > case sensitive = no > kernel oplocks = no > > > [homes] > comment > browseable = no > writeable = yes > > [acct] > path = /usr/local/var/samba/acct > writeable = yes > guest ok = yes > browseable = no > create mask = 0765 > directory mask = 0775 > oplocks = False > level2 oplocks = False > > > [engr] > path = /usr/local/var/samba/engr > writeable = yes > browseable = no > guest ok = yes > create mask = 0765 > directory mask = 0775 > oplocks = False > level2 oplocks = False > > > Active Directory is not used. All workstations (about 25) simply map > drive letters locally. > > This performance problem appeared only after we began using Samba for > file server. Never saw this in close to 15 years of using Netware -- > so I suspect it is not purely an MS-Office problem, but something to > do with the interaction between MS-Office and Samba. I eagerly await > your help! > >
Marcello Romani
2007-Jun-14 06:27 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba
Berend Tober ha scritto:> The first time a Word or Excel file is opened, i.e., when either Word or > Excel have not been actively running "recently" (like, say for several > minutes or more), the time it takes to start the application and load > the file seem inordinately long. > > Once the first evolution is complete, files open more-or-less instantly > if I close the first document but leave either app running (but void of > any open documents). This pertains to the same file opened a second > time, or different files -- once Word/Excel has done whatever it is > thats takes so long for initial start up, then load performance is > acceptable (in fact it is very impressive!). > > And it is not merely the loading of the app, because it happens both > when I start the apps implicitly by double-clicking on a document in > Windows Explorer, but also if I first start Word/Excel explicitly from > the START menu without a specific document and then open one from the > Samba share using File|Open. > > Envirnoment: > > Server is RHEL 5 with Samba version samba-3.0.23c-2.el5.2.0.2 > > Desktops are XP Pro SP2 on some, and XP Home SP2 on others. > > MS Office Suite is XP Pro (i.e., Word/Excel 2002) > > Desktops also run Symantec Corporate Edition 8.1 (although same problem > continues on a machine from which I uninstalled that as part of my > debugging.) > > I initially had no explicit settings regarding opportunistic locking in > smb.conf, but I've tried server different configurations without > improvement. What appears below is the current configuration and the > problem still pertains. > > > smb.conf: > > [global] > workgroup = mygroup > server string = Samba Server > hosts allow = 192.168.123. 127. > cups options = raw > log file = /var/log/samba/%m.log > max log size = 50 > dns proxy = no > username map = /etc/samba/smbusers > case sensitive = no > kernel oplocks = no > > > [homes] > comment > browseable = no > writeable = yes > > [acct] > path = /usr/local/var/samba/acct > writeable = yes > guest ok = yes > browseable = no > create mask = 0765 > directory mask = 0775 > oplocks = False > level2 oplocks = False > > > [engr] > path = /usr/local/var/samba/engr > writeable = yes > browseable = no > guest ok = yes > create mask = 0765 > directory mask = 0775 > oplocks = False > level2 oplocks = False > > > Active Directory is not used. All workstations (about 25) simply map > drive letters locally. > > This performance problem appeared only after we began using Samba for > file server. Never saw this in close to 15 years of using Netware -- so > I suspect it is not purely an MS-Office problem, but something to do > with the interaction between MS-Office and Samba. I eagerly await your > help! > >Have you tried copying (tens of MBs) files or even those same office files to/from the share ? What is the performance there ? I had a similar performance problem which showed up in Office, but I found out it was not limited to "office" files, but affected the transfer speed between the client and the server in general. I have found a solution and posted it to this list, search for the thread "Vista client / Linux server - hight browsing latency" (or I will send you the e-mail if you so desire). HTH -- Marcello Romani Responsabile IT Ottotecnica s.r.l. http://www.ottotecnica.com
Berend Tober
2007-Jun-14 14:31 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba (Solved)
Marcello Romani wrote:> Berend Tober ha scritto: >> The first time a Word or Excel file is opened, i.e., when either Word >> or Excel have not been actively running "recently" (like, say for >> several minutes or more), the time it takes to start the application >> and load the file seem inordinately long. >> >> Once the first evolution is complete, files open more-or-less >> instantly ...Part of this implementation involved "hedging my bets", meaning I left the Novell Netware Client software installed on all the desktop computers in case there was a major, unanticipated disaster and we had to resume legacy server operations. Once that client software is removed, the initial load performance problem ceases.
Aaron Kincer
2007-Jun-14 21:00 UTC
[Samba] Very slow initial opening MS-Word and MS-Excel files from Samba
I fixed this by using the following in login scripts for every share each domain account was supposed to have: net use driveletter: /delete net use driverletter: \\newserver\newsharelocation This fixed 99% of the invalid shares we had. There were a few people that had manually mapped drives. I just removed their mappings and added their mapped drives to their login scripts to set it correctly and that solved the issue. I eventually turned this off after I was satisfied all bad mappings had been resolved. Of course, it was the complaint of a user who uses offline files heavily that really helped nudge me into turning it off. The delete command was mucking up his sync process when he logged in first thing in the morning. Offline files sync as soon as they possibly can. Login scripts continue run if they are taking a while to complete despite syncing. The whole delete and recreating of a share seems to take just long enough so that a share can be delete while syncing is going on. The sync process gets very moody when you take away its mapped drive during sync. Jonathan Johnson wrote:> Please review the Samba HOWTO, chapter 10, "Common Errors" where it > discusses this issue. > > http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html#id350945 > > > Jonathan Johnson > Sutinen Consulting, Inc. > www.sutinen.com > > > Aaron Kincer wrote: >> Also, as others have mentioned, Windows and its applications can have >> long memories about servers contacted in the past. For example, the >> list of recently opened files. >>