Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Disabling opportunistic locking

Posted on 2010-09-07
12
Medium Priority
?
1,731 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:Richard Quadling
ID: 33619823
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:Richard Quadling
ID: 33619832
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
ID: 33619866
Thanks

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

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Accepted Solution

by:
Richard Quadling earned 2000 total points
ID: 33619936
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
ID: 33625760
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:Richard Quadling
ID: 33625859
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
 
LVL 1

Author Comment

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

Much appreciated
0
 
LVL 1

Author Comment

by:gerlis
ID: 33673056
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:Richard Quadling
ID: 33673319
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
ID: 33673480
Thanks, anyway. I will see if I can use the ProcMon.

I'll keep you posted
0
 
LVL 1

Author Comment

by:gerlis
ID: 34038033
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
ID: 34038045
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

971 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