Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1736
  • Last Modified:

Disabling opportunistic locking

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
gerlis
Asked:
gerlis
  • 7
  • 5
1 Solution
 
Richard QuadlingSenior Software DeverloperCommented:
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
 
Richard QuadlingSenior Software DeverloperCommented:
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
 
gerlisAuthor Commented:
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!

 
Richard QuadlingSenior Software DeverloperCommented:
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
 
gerlisAuthor Commented:
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
 
Richard QuadlingSenior Software DeverloperCommented:
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
 
gerlisAuthor Commented:
Thanks, I'll take a detailed look at it later today and tomorrow

Much appreciated
0
 
gerlisAuthor Commented:
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
 
Richard QuadlingSenior Software DeverloperCommented:
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
 
gerlisAuthor Commented:
Thanks, anyway. I will see if I can use the ProcMon.

I'll keep you posted
0
 
gerlisAuthor Commented:
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
 
gerlisAuthor Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now