Solved

Disabling opportunistic locking

Posted on 2010-09-07
12
1,689 Views
Last Modified: 2012-05-10
We seem to have exaclty the same situation at one of our clients that happened in EE question

(They have a Windows 2003 Server with mainly Win XP clients)

http://www.experts-exchange.com/Networking/Windows_Networking/Q_21693160.html

It refers to a soluiton from MS to disable opportunistic locking

In the MS Solution

http://support.microsoft.com/?kbid=296264

It describes how do do it via the registry, but I'm confused. Firstly does it mean on the server or client workstations? Secondly there is no key in the registry path it specifies:

OplocksDisabled REG_DWORD

All I have is: "CscEnabled"=dword:00000001

On either the XP workstatins or on the server. Does it mean I should add it?

Thirdly, do I need to do all the reg key changes it refers to?

All explanations greatly received.
0
Comment
Question by:gerlis
  • 7
  • 5
12 Comments
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
If the entry doesn't exist, create it.

I used to have to do this for the Sage Line 50 and Line 100 apps (DOS and Windows based).

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2584291 covers everything. It is a lot to read though.

0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
If you use a tool like RegMon, you'll see a LOT of keys that don't exist being accessed. They all have their default values.
0
 
LVL 1

Author Comment

by:gerlis
Comment Utility
Thanks

Does it need to be done on the server as well as the workstation(s)?

0
 
LVL 40

Accepted Solution

by:
RQuadling earned 500 total points
Comment Utility
As I understand things, yes. I used to develop EPOS software using Windows and DOS. Tills would be DOS or Win98SE and later XP. As the app was peer-to-peer, no real "server" needed, so a bigger workstation was used for the file hosting.

Worked well.

I'm not an expert on the locking, but in essence, the locks were held locally and only sent to the "server" when necessary.

In a multi-user realtime system, this is a problem.

There are some issues with speed, certainly, but speed vs. accuracy .... well, accuracy wins every time.

And in truth, the amount of network delay was negligible for our app. Most of the time the app is waiting on the user to do something (scan a barcode, counting change, waiting for receipt printer, etc.).

0
 
LVL 1

Author Comment

by:gerlis
Comment Utility
Thanks, in our case we do need the speed!  If a file is opend directly through the application i.e. Word or Excel then navigate to the file, it opens quickly. If accessed direct on the mapped drive on the server it's very very slow to open.  Problem only applies to Word & Excel, pdfs for example are fine. The orginal EE questin is exactly what our client is experiencing.

This is what I've done so far, but didn't seem to make much difference in opening files from the server, it's still very slow.

I added (on server and a Win XP workstation):

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\
OplocksDisabled REG_DWORD 0 or 1
Default: 0 (not disabled)

I set it to 1

I added (on server and a Win XP workstation)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
EnableOplocks REG_DWORD 0 or 1
Default: 1 (enabled)

I set it to 0

I restarted both server and workstation

Do I need to do the other three registry value changes/additions as mentioned on the MS article?
Any idea why this has just started to happen on this network?
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
Locking in this way is co-operative. All users MUST use the same mechanism for the locking to be effective.

If user A is NOT passing the lock down to the hosting machine, other users won't see it. And confusion ensues.

There are a several settings. I'm still looking for the regex I used to use ... But over 8 years ago ...


Stuff..

http://www.superbase.com/services_tech_support_oplocks.htm ((C) 2003)


Aha!!

http://www.dataaccess.com/whitepapers/opportunlockingreadcaching.html This is the article to read. It is all there. No matter what I've said, it was all based upon memory of this article. So. Read this one and see what you need to do.

But it seems you've probably already done it.

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 1

Author Comment

by:gerlis
Comment Utility
Thanks, I'll take a detailed look at it later today and tomorrow

Much appreciated
0
 
LVL 1

Author Comment

by:gerlis
Comment Utility
I read tyhe article and although more aobut data access, it is still relevant, but, as you say, I have already done the things for disabling oplocks in the registry.

It seems to be affecting most users on the network. It is only Word & Excel documents when accessed on the server, pdfs are fine. If the applicatin is opened first, e.g. Word and the file is accessed from the server that way, it opens fine.

On two of the client PCs (Win XP) i have made the registry changes, and also on the server. At the end of last week it seemed to improve, also yesterday, but today it is back to its old self.

Interestingly, one of their machines has Windows Vista and this is absolutely fine.

Any further ideas?
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
I would use something like ProcMon to see EXACTLY what activity is happening in regards to the files in question.

I don't know Vista or Win7 or what/how the locking may (or not) have changed.

If you need more help, please use the "Request Attention" button as I'm pretty much out of ideas at the moment.
0
 
LVL 1

Author Comment

by:gerlis
Comment Utility
Thanks, anyway. I will see if I can use the ProcMon.

I'll keep you posted
0
 
LVL 1

Author Comment

by:gerlis
Comment Utility
The problem is still a bit intermittent on the users's system but not causing any real difficulties, there are simple ways round it, such as opening Word first then selecting the file from the server.

Nonetheless I learnt some new things here, thanks.
0
 
LVL 1

Author Closing Comment

by:gerlis
Comment Utility
The problem is still a bit intermittent on the users's system but not causing any real difficulties, there are simple ways round it, such as opening Word first then selecting the file from the server.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now