From: Rune Tønnesen on
Den 05-03-2010 20:42, Lars Bensmann skrev:
> Hello,
>
> after having no problem with four Windows 2000 workstations and one Samba
> 2.something server for several years in a medical practice the practice
> software (DocComfort) dropped support for Windows 2000 beginning of this
> year. So I bought new hardware for the workstations and servers and
> installed from scratch. Now there are four Windows 7 Professional 32bit
> Workstations (with UAC disabled) and one Debian Lenny Server with Samba
> from backports.org (I started with 3.4.3 (2:3.4.3-1~bpo50+2) and just now
> upgraded to 3.4.5 (2:3.4.5~dfsg-1~bpo50+2), but this did not make a
> difference).
>
> The application works with a lot of database files (*.DBF) and everything
> works fine if only one workstation has started the application. Getting
> from the main menu to the data for the first patient takes about 3 to 5
> seconds which is fine. But every station started after the first one takes
> about 35 seconds to get to the data for the first patient. Once the
> application is started further requests are fast. Unfortunately the
> application cannot be open all the time, so there is always this 30 second
> delay which is not acceptable.
>
> I tried for a week to solve this problem but I'm running out of ideas.
> My first guess was that this is probably a locking problem and this does
> indeed seem to be the case. I disabled oplocks in smb.conf which
> unfortunately only had the effect that then even the first station gets
> hit with the 30 second penalty.
>
> Tuning different parameters (read/write raw) had no noticable effect on
> the delay.
>
> Monitoring the activity in top shows that during these 30 seconds the smbd
> process for the client is consuming all processing power it can get (on
> one core).
>
> Having set "loglevel = 2 locking:10" the log gets filled up with entries
> like these:
>
> [2010/03/05 20:04:30, 8] locking/posix.c:234(posix_fcntl_getlock)
> posix_fcntl_getlock 105 4729736 242 0
> [2010/03/05 20:04:30, 8] lib/util.c:1832(fcntl_getlock)
> fcntl_getlock fd=105 offset=4729736 count=242 type=0
> [2010/03/05 20:04:30, 3] lib/util.c:1856(fcntl_getlock)
> fcntl_getlock: fd 105 is returned info 2 pid 0
> [2010/03/05 20:04:30, 8] locking/posix.c:264(posix_fcntl_getlock)
> posix_fcntl_getlock: Lock query call successful
> [2010/03/05 20:04:30, 10] locking/brlock.c:1270(brl_locktest)
> brl_locktest: posix start=4729736 len=242 unlocked for fnum 5219 file doc2/daten/deziff/EBM2000/ziffer.DBF
> [2010/03/05 20:04:30, 10] locking/locking.c:152(strict_lock_default)
> strict_lock_default: flavour = WINDOWS_LOCK brl start=4729736 len=242 unlocked for fnum 5219 file doc2/daten/deziff/EBM2000/ziffer.DBF
> [2010/03/05 20:04:30, 10] locking/posix.c:284(is_posix_locked)
> is_posix_locked: File doc2/daten/deziff/EBM2000/ziffer.DBF, offset = 4729978, count = 242, type = READ
> [2010/03/05 20:04:30, 10] locking/posix.c:172(posix_lock_in_range)
> posix_lock_in_range: offset_out = 4729978, count_out = 242
>
> This repeats over and over. Only offset is increased by 242 each time.
> These entries fill up the 1M log file in about 1 or 2 seconds.
>
> I hope someone has an idea what I can do about this. The company
> supporting the practice management application is no help at all and only
> suggested switching to Windows Server which I really, really don't want to
> do.
>
> I followed the Samba Checklists and did all the test therin. Everything
> was fine except two tests (Nr. 5 and 6). Could this be part of the
> problem? Everything else is working fine. Domain logons are a bit on the
> slow side, but acceptable. Copying large files from Samba to the clients
> is at the limit of what's possible with the 100MBit network.
>
> Thanks for any help or pointers to documentation that might help with this
> problem,
> Lars
>
> Test nr. 5 fails:
> $ nmblookup.samba3 -B HINTEN-PC '*'
> added interface eth0 ip=fe80::e2cb:4eff:fe39:e8c2%eth0
> bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
> added interface eth0 ip=10.121.1.1 bcast=10.121.1.255
> netmask=255.255.255.0
> added interface lo ip=::1 bcast=::1
> netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
> added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
> querying * on 10.121.1.3
> name_query failed to find name *
>
> Test nr. 6 only returns the address of the server and no client addresses:
> $ nmblookup.samba3 -d 2 '*'
> added interface eth0 ip=fe80::e2cb:4eff:fe39:e8c2%eth0
> bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
> added interface eth0 ip=10.121.1.1 bcast=10.121.1.255
> netmask=255.255.255.0
> added interface lo ip=::1 bcast=::1
> netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
> added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
> querying * on 10.121.1.255
> Got a positive name query response from 10.121.1.1 ( 10.121.1.1 )
> 10.121.1.1 *<00>
>
> I also captured traffic with wireshark of one startup with no delay and
> one startup were the application was already running on another
> workstation. As this are too big for the mailing list (16MB and 26MB) I
> put them up for download:
> http://almosthappy.de/duhLd6Tm1GQoC3j0YyiJ637IS/capture.fast
> http://almosthappy.de/duhLd6Tm1GQoC3j0YyiJ637IS/capture.slow
> (These were captured with Samba 3.4.3.)
>
> Here is some more output of my configuration:
>
> $ uname -a
> Linux server 2.6.26-2-amd64 #1 SMP Thu Feb 11 00:59:32 UTC 2010 x86_64 GNU/Linux
>
> $ testparm.samba3
> Load smb config files from /etc/samba/smb.conf
> Processing section "[homes]"
> Processing section "[netlogon]"
> Processing section "[DocExpert]"
> Processing section "[profiles]"
> Loaded services file OK.
> Server role: ROLE_DOMAIN_PDC
> Press enter to see a dump of your service definitions
>
> [global]
> workgroup = PRAXIS
> server string = %h server
> interfaces = eth0, lo
> bind interfaces only = Yes
> obey pam restrictions = Yes
> pam password change = Yes
> passwd program = /usr/bin/passwd %u
> passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
> unix password sync = Yes
> log level = 2 locking:10
> syslog = 0
> log file = /var/log/samba/log.%m
> max log size = 1000
> time server = Yes
> max open files = 10000
> load printers = No
> printcap name = /dev/null
> disable spoolss = Yes
> add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
> logon script = logon.cmd
> logon path = \\%N\profiles\%U
> logon drive = P:
> domain logons = Yes
> os level = 255
> preferred master = Yes
> domain master = Yes
> panic action = /usr/share/samba/panic-action %d
> hosts allow = 10.121.1.1/24, 127.
> hosts deny = ALL
> printing = bsd
> print command = lpr -r -P'%p' %s
> lpq command = lpq -P'%p'
> lprm command = lprm -P'%p' %j
>
> [homes]
> comment = Home Directories
> valid users = %S
> read only = No
> create mask = 0700
> directory mask = 0700
> browseable = No
> browsable = No
>
> [netlogon]
> comment = Network Logon Service
> path = /home/samba/netlogon
> guest ok = Yes
>
> [DocExpert]
> comment = Doc Expert
> path = /home/samba/docexpert
> read only = No
> create mask = 0660
> force create mode = 0660
> directory mask = 0770
> force directory mode = 0770
>
> [profiles]
> comment = Network Profiles Share
> path = /home/samba/profiles
> read only = No
> create mask = 0600
> directory mask = 0700
> hide files = /desktop.ini/outlook*.lnk/*Briefcase*/
> store dos attributes = Yes
> browseable = No
> browsable = No
>
>
>
Dear Lars

A few years ago i had a similarly problem, unfortunately I don't have
the config file.
You might want to look into oplocks, but be aware of your dataintegrity.
http://www.samba.org/samba/docs/using_samba/ch08.html
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2616906

--
Best Regards
Rune T�nnesen

From: Stan Hoeppner on
Rune Tønnesen put forth on 3/5/2010 3:11 PM:
> Den 05-03-2010 20:42, Lars Bensmann skrev:
>> Hello,
>>
>> after having no problem with four Windows 2000 workstations and one Samba
>> 2.something server for several years in a medical practice the practice
>> software (DocComfort) dropped support for Windows 2000 beginning of this
>> year. So I bought new hardware for the workstations and servers and
>> installed from scratch. Now there are four Windows 7 Professional 32bit
>> Workstations (with UAC disabled) and one Debian Lenny Server with Samba
>> from backports.org (I started with 3.4.3 (2:3.4.3-1~bpo50+2) and just now
>> upgraded to 3.4.5 (2:3.4.5~dfsg-1~bpo50+2), but this did not make a
>> difference).

It's 2010. This style of application design is archaic. Any application of
this nature in 2010 should be using a network database engine (Oracle,
MSSQL, MySQL, DB2, PostgreSQL, etc) instead of shared file locking,
especially in the medical field.

Is it possible that this new version of DocComfort finally switched to a
database server driven design, and they left the shared file access mode as
a legacy compatibility mode for those who've not switched to the db model?
And they fubar'd the shared file access mode of the latest version in the
process? Neglected it? Etc?

If no db engine version, then copy everything to a Win7 PC and share it.
Configure all the PCs to access that share. If the problem persists, the
cause is DocComfort, not Samba.

--
Stan
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Lars Bensmann on
Dear Rune,

On Fri, Mar 05, 2010 at 10:11:25PM +0100, Rune Tønnesen wrote:
> A few years ago i had a similarly problem, unfortunately I don't have
> the config file.
> You might want to look into oplocks, but be aware of your dataintegrity.
> http://www.samba.org/samba/docs/using_samba/ch08.html
> http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2616906

thanks for your reply. Unfortunately I already read everything I could
find about locking/oplocks (including your links :-) and tried every
configuration variable and it did not improve anything.

Thanks,
Lars

--
Television - a medium.
So called because it is neither rare nor well-done.
-- Ernie Kovacs
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Jeremy Allison on
On Sat, Mar 06, 2010 at 02:12:16AM +0100, Lars Bensmann wrote:
> On Fri, Mar 05, 2010 at 03:45:31PM -0600, Stan Hoeppner wrote:
> > It's 2010. This style of application design is archaic. Any application of
> > this nature in 2010 should be using a network database engine (Oracle,
> > MSSQL, MySQL, DB2, PostgreSQL, etc) instead of shared file locking,
> > especially in the medical field.
>
> Well, on a technical level I totally agree. One might argue that the
> administrative overhead is overkill for small medical pratices with just 1
> to 4 stations, but it's a moot point anyway. I did not buy the software,
> I'm just suffering the consequences :-) And the company that makes the
> software is probably caught in compatibility hell anyway.
>
> > Is it possible that this new version of DocComfort finally switched to a
> > database server driven design, and they left the shared file access mode as
> > a legacy compatibility mode for those who've not switched to the db model?
> > And they fubar'd the shared file access mode of the latest version in the
> > process? Neglected it? Etc?
>
> No. There is no DB functionality.
>
> > If no db engine version, then copy everything to a Win7 PC and share it.
> > Configure all the PCs to access that share. If the problem persists, the
> > cause is DocComfort, not Samba.
>
> Thanks for the hint. I should have thought about this earlier. I did copy
> everything to one of the Windows 7 clients, set up a share and everything
> works fine. I really don't like this as a permanent solution but at least
> it's a (temporary?) workaround and it shows that it is indeed a Samba
> problem.
>
> But I have run out of ideas what to try. Thanks for any further input,

Did you try setting:

kernel oplocks = no
oplocks = no
level2 oplocks = no
posix locking = no

on that share ? This will leave you with only Samba share mode
and byte range locking (no mapping down to the underlying
system) - which should behave identically to Windows.

Remeber to restart Samba before testing.

Jeremy.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Lars Bensmann on
On Fri, Mar 05, 2010 at 03:45:31PM -0600, Stan Hoeppner wrote:
> It's 2010. This style of application design is archaic. Any application of
> this nature in 2010 should be using a network database engine (Oracle,
> MSSQL, MySQL, DB2, PostgreSQL, etc) instead of shared file locking,
> especially in the medical field.

Well, on a technical level I totally agree. One might argue that the
administrative overhead is overkill for small medical pratices with just 1
to 4 stations, but it's a moot point anyway. I did not buy the software,
I'm just suffering the consequences :-) And the company that makes the
software is probably caught in compatibility hell anyway.

> Is it possible that this new version of DocComfort finally switched to a
> database server driven design, and they left the shared file access mode as
> a legacy compatibility mode for those who've not switched to the db model?
> And they fubar'd the shared file access mode of the latest version in the
> process? Neglected it? Etc?

No. There is no DB functionality.

> If no db engine version, then copy everything to a Win7 PC and share it.
> Configure all the PCs to access that share. If the problem persists, the
> cause is DocComfort, not Samba.

Thanks for the hint. I should have thought about this earlier. I did copy
everything to one of the Windows 7 clients, set up a share and everything
works fine. I really don't like this as a permanent solution but at least
it's a (temporary?) workaround and it shows that it is indeed a Samba
problem.

But I have run out of ideas what to try. Thanks for any further input,
Lars

--
The idea is to die young as late as possible.
-- Ashley Montagu
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba