'Opportunistic Locking' On

Version Relevance: All versions

Issue: This one is a real hot potato at present. During implementation we had 'Ops-Locking' switched 'on' and running as a 'Local' installation. The data is stored on a Windows 2003 Server. We were experiencing the 'deadly embrace' (padlock) and Received WOs would be accounted for in Inventory but remain open (but locked to another user).

Perhaps a little late and after several discussions with Chris and Paul our IT Manager switched 'Ops-Locking' 'off'.

All was well from mid-May to the start of July. However, in the last week we have experienced real problems with our network (running up to 5 times slower) and lots of crashes in several different programmes. The 'Ops-Locking' Off may be the cause and so it is now back 'on' and we are back to square one!!

Our only alternative may be to run 'Vision' from a seperate server (or workstation). The only slight problem is that we serve ODBC info. on to our intranet and this seems to have to be located on the same server to function.

I would be very interested from hearing from other users if you have experienced any other network problems with 'Ops-Locking' Off.

Jul 15th, 2004

Feedback: I didn't realise that you had 6 weeks or so of smooth running after turning off Opportunistic Locking, before the recent server problems manifested themselves.

This rather points to something else that has taken place in the last couple of weeks or so, that is working in conjunction with Ops-locking-off to cause the problems.

All other things being equal, turning off opportunistic locking should not cause the problems you have seen with other applications. Microsoft themselves recommend it when shared files are in use on the server.

Can you identify any other changes that have taken place on the server recently?

Has anybody else had problems of this nature?

Paul Wilson - Caliach Consultant

Issue: I have been investigating the op locking/slow file serving problem futher and have carried out the following tests. Caliach system timing from my workstation to a server with op locking on and off both on the work station and the server. With op locking on an Overall access performance factor of 1.108 and Overall terminal performance factor of 3.678 was scored. If op locking is then turned off the scores change to Overall access performance factor of 11.712 and overall terminal performance factor of 4.367.

Also I have carried out some simple network benchmarks using three tests.

1 = Create write and close temp file.
2 = write 128k
3 = 100 random reads.
Results are the average of 100 tests with Antivirus scanning turned off.

Op locking on.
1 = 265.36ms
2 = 263.51ms
3 = 113.79ms

Op locking off.
1 = 38.33ms
2 = 23.78ms
3 = 31.61ms

The server in question is a fresh install of Server 2003 Standard Edition. The data file was copyed into a share on a RAID-1 (mirrored) disk and accessed across a 100Mbps LAN. I have sent a full set of results to Caliach and would be very interested in hearing for anyone else with this problem.

Jul 15th, 2004

Feedback: When carrying out these tests, one must bear in mind the following: -

  • Opportunistic locking was employed as a means of demonstrating a performance advantage in some situations, and was only ever expected to give a significant advantage when bulk-processing in single-user mode on a file-based application.
  • As soon as other users have, or request, access to the same file, the performance advantage can be lost, and the resulting file locking/unlocking protocols become unreliable and prone to data loss due to delays in writing to disk and untimely locks.
  • This is why Microsoft themselves recommend turning off opportunistic locking for file-based multi-user databases, including their own Access .mdb files, the jet database engine and collaborative Microsoft Office applications.
  • Regardless of any performance gains in single-user mode, the stability of the network o/s should always be greater with opportunistic locking off than on, as data is written directly to disk instead of being cached/released/written.
  • If a reduction in stability is seen with opportunistic locking turned off, then the application causing the instability should be identified and corrected, rather than returning the server to single-user mode and risking database corruption on multi-user databases.
  • If the performance hit with opportunistic locking off is deemed unacceptable (e.g. with large single-user CAD file access), and it is not practical to move the Caliach Vision datafile to another server, then the Omnis databridge may solve the problem (see the reference book).
  • This technology bypasses the server OS file access and locking protocols completely, and uses TCP/IP for direct communication between the application and the datafile. The server daemon application can run on Linux, MacOSX or Windows 2000/XP, and it is recommended that the latest version of the databridge that shipped with Omnis Studio 3.3.3 (on the Caliach Vision V2.0 CD) is used.
  • Caliach Ltd can accept no liability for data loss, or any other loss resulting from inappropriate server or network configuration.

Paul Wilson - Caliach Consultant