-------- Original Message -------- Subject: File Locking and Permissions Issue Date: Wed, 14 May 2008 15:10:28 -0700 From: Jack Lauman <jlauman@nwcascades.com> Organization: nwcascades.com To: mailto:samba@lists.samba.org I'm trying to get Lacerte 2007 Tax Accounting software working on a Samba v3.0.28a based server. When one user is logged in it works fine. When two or more users are accessing the database files it slows to a crawl. Lacerte's tech support personnel set up an identical scenereo in their lab. Here's what the found: <quote> I compared the open files with one computer in Lacerte vs. two computers in Lacerte and noticed one thing peculiar: when one computer is using Lacerte, all files are opened with exclusive+batch oplocks including Data1i07.dbf, however when 2 computers are running Lacerte, a few files open without oplocks, notably data1i07.dbf. I have also attached a copy of my smbstatus output (put into an Excel spreadsheet, computer 1 highlighted in yellow, computer 2 in blue.) This seems to be the same way it was working on your server. One more thing to note - I was logged in as the same user on both workstations - if you can try that configuration and it works, that might clue us in to some kind of permissions issue. </quote> I've attached both files to this message. Any help in resolving this matter would be greatly appreciated. Thanks, Jack Lauman -------------- next part -------------- [global] server string = Linux Samba Server V %v workgroup = WORKGROUP interfaces = eth0 127.0.0.1 bind interfaces only = yes security = user log file = /var/log/samba/log.%m time server = yes socket options = TCP_NODELAY IPTOS_LOWDELAY os level = 65 preferred master = yes domain master = yes local master = yes guest account = smbuser printcap name = cups printing = cups wins support = yes use client driver = yes encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd idmap uid = 16777216-33554431 idmap gid = 16777216-33554431 template shell = /bin/false winbind use default domain = no [homes] browsable = no writable = yes [intuit] comment = Lacerte Server path = /home/arends/intuit read only = no guest ok = yes [public] comment = Public file access path = /home/public read only = no create mask = 2775 directory mask = 0775 guest ok = yes [web] comment = WWW path = /var/www/html valid users = arends read only = no [printers] printer = raw comment = All Printers path = /var/spool/samba guest ok = yes public = yes writable = yes printable = yes browseable = yes [print$] comment = Printer Drivers path = /etc/samba/printer guest ok = no broweseable = yes read only = yes write list = arends,gijane,root
On Wed, May 14, 2008 at 03:30:54PM -0700, Jack Lauman wrote:> I'm trying to get Lacerte 2007 Tax Accounting software working on a > Samba v3.0.28a based server. When one user is logged in it works fine. > When two or more users are accessing the database files it slows to a > crawl.But it still does work?> I compared the open files with one computer in Lacerte vs. two > computers in Lacerte and noticed one thing peculiar: when one computer > is using Lacerte, all files are opened with exclusive+batch oplocks > including Data1i07.dbf, however when 2 computers are running Lacerte, a > few files open without oplocks, notably data1i07.dbf. I have alsoThat's expected. Oplocks with r/w are only possible for exclusive access. I've had a customer experiencing exactly the same issue that you have. Different application, but it was used against Samba in production and it was terribly slow. They tested it against Windows -- it was fast. It turned out that against Samba they had several concurrent users and the test against Windows only had one user. Just the simple operation of copying the file away from the Windows server while the test on Windows was running made the app show exactly the same behaviour against Windows as it formerly had against Samba: It was almost unusably slow because its oplock had been broken. I'm not saying that Samba is bug-free here, but what you are describing really smells like a horrendously badly written Windows application that has never been really tested with multi-user access. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20080515/f7a7bc15/attachment.bin
Jack Lauman wrote:> <snip> > > I compared the open files with one computer in Lacerte vs. two > computers in Lacerte and noticed one thing peculiar: when one computer > is using Lacerte, all files are opened with exclusive+batch oplocks > including Data1i07.dbf, however when 2 computers are running Lacerte, a > few files open without oplocks, notably data1i07.dbf. >I'm assuming that both users need to write to these files? Maybe I'm missing something but this seems to be entirely expected behaviour. Oplocks allow a client to cache data rather than having to constantly sync to the server, obviously if there is more than one client doing this things break. You could use fake oplocks to grant oplocks to all clients, but unless the application is designed for it (which I doubt it is) you will just wind up corrupting your data. If the application is regularly opening and closing files (and therefore possibly being granted oplocks and then having them broken) you might find that performance improves by disabling oplocks altogether (well, performance for multiple users, performance for a single user would suffer).> <snip> I've attached both files to this message. Any help in > resolving this > matter would be greatly appreciated. >I think the list strips non-text attachments, so no excel file. Not that I think it's terribly important since it sounds like your system is working exactly as it should.> Thanks, > > Jack Lauman >*Michael Heydon - IT Administratorr * michaelh@jaswin.com.au <mailto:michaelh@jaswin.com.au>
For some reason the excel file was stripped in my last post. (See below). We would appreciate any help we can get on this. Intuit tried this on their test server and we don't know whats causing the files to open without oplocks when a second user tries to access the database. Thanks, Jack Jack Lauman wrote:> > > -------- Original Message -------- > Subject: File Locking and Permissions Issue > Date: Wed, 14 May 2008 15:10:28 -0700 > From: Jack Lauman <jlauman@nwcascades.com> > Organization: nwcascades.com > To: mailto:samba@lists.samba.org > > I'm trying to get Lacerte 2007 Tax Accounting software working on a > Samba v3.0.28a based server. When one user is logged in it works fine. > When two or more users are accessing the database files it slows to a > crawl. > > Lacerte's tech support personnel set up an identical scenereo in their > lab. Here's what the found: > > <quote> > I compared the open files with one computer in Lacerte vs. two > computers in Lacerte and noticed one thing peculiar: when one computer > is using Lacerte, all files are opened with exclusive+batch oplocks > including Data1i07.dbf, however when 2 computers are running Lacerte, a > few files open without oplocks, notably data1i07.dbf. I have also > attached a copy of my smbstatus output (put into an Excel spreadsheet, > computer 1 highlighted in yellow, computer 2 in blue.) This seems to be > the same way it was working on your server. > > One more thing to note - I was logged in as the same user on both > workstations - if you can try that configuration and it works, that > might clue us in to some kind of permissions issue. > </quote> > > I've attached both files to this message. Any help in resolving this > matter would be greatly appreciated. > > Thanks, > > Jack Lauman >Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time 15314 500 DENY_WRITE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/Setup07/Setup.XML Tue May 13 23:10:24 2008 15001 500 DENY_NONE 0x100001 RDONLY NONE /home/arends/intuit . Tue May 13 23:07:44 2008 15314 500 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/DATA1I07.DBF Tue May 13 23:10:25 2008 15314 500 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/urn/User002.LW7 Tue May 13 23:10:24 2008 15314 500 DENY_WRITE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/06tax/OPTION06/OPINDEX.W6 Tue May 13 23:10:24 2008 15314 500 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/DDRIDI07.DAT Tue May 13 23:10:24 2008 15314 500 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/DATA1I07.MDX Tue May 13 23:10:17 2008 15314 500 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/urn/User001.LW7 Tue May 13 23:10:24 2008 Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time 15001 500 DENY_NONE 0x100001 RDONLY NONE /home/arends/intuit . Tue May 13 23:07:44 2008 15314 500 DENY_NONE 0x2019f RDWR NONE /home/arends/intuit Lacerte/07tax/IDATA/DATA1I07.DBF Tue May 13 23:10:25 2008 15001 500 DENY_NONE 0x2019f RDWR NONE /home/arends/intuit Lacerte/07tax/IDATA/DATA1I07.DBF Tue May 13 23:11:20 2008 15314 500 DENY_NONE 0x2019f RDWR NONE /home/arends/intuit Lacerte/07tax/IDATA/urn/User002.LW7 Tue May 13 23:10:24 2008 15001 500 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/DDRIDI07.DAT Tue May 13 23:11:16 2008 15001 500 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/urn/User003.LW7 Tue May 13 23:11:16 2008 15001 500 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /home/arends/intuit Lacerte/07tax/IDATA/urn/User001.LW7 Tue May 13 23:11:16 2008 -------------- next part -------------- [global] server string = Linux Samba Server V %v workgroup = WORKGROUP interfaces = eth0 127.0.0.1 bind interfaces only = yes security = user log file = /var/log/samba/log.%m time server = yes socket options = TCP_NODELAY IPTOS_LOWDELAY os level = 65 preferred master = yes domain master = yes local master = yes guest account = smbuser printcap name = cups printing = cups wins support = yes use client driver = yes encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd idmap uid = 16777216-33554431 idmap gid = 16777216-33554431 template shell = /bin/false winbind use default domain = no [homes] browsable = no writable = yes [intuit] comment = Lacerte Server path = /home/arends/intuit read only = no guest ok = yes [public] comment = Public file access path = /home/public read only = no create mask = 2775 directory mask = 0775 guest ok = yes [web] comment = WWW path = /var/www/html valid users = arends read only = no [printers] printer = raw comment = All Printers path = /var/spool/samba guest ok = yes public = yes writable = yes printable = yes browseable = yes [print$] comment = Printer Drivers path = /etc/samba/printer guest ok = no broweseable = yes read only = yes write list = arends,gijane,root