How do I disable opportunist locking?
April 22, 2001
A. Windows XP and Windows 2000 support opportunist locking, which lets Sever Message Block (SMB) clients lock a file on the server and cache the information, without having to worry whether another user might change the file (earlier Windows versions also support this feature, but the method is different). Opportunist locking leads to better performance for the user. However, it adds a workload to the server, which must maintain and manage the locks. You can use one of two methods to disable opportunist locking.
Method 1
Start regedit.exe.
Go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMRxSmbParameters.
From the Edit menu, select New, DWORD value.
Enter a name of OplocksDisabled, and press Enter.
Double-click the new value, and set it to 1.
Click OK.
Method 2
Start regedit.exe.
Go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters.
From the Edit menu, select New, DWORD value.
Enter a name of EnableOplocks and press Enter.
Double-click the new value, and set it to 0.
Click OK.
In addition, under the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters, you can set the following optional parameters to tune opportunist locking:
MinLinkThroughput (DWORD)—The minimum number of bytes per second that must be maintained through the server before the lock is disabled (0 to infinite)
MaxLinkDelay (DWORD)—The maximum time allowed for a delay in the link before the lock is disabled (0 to 100,000 seconds)
OplockBreakWait (DWORD)—The time the server waits for a client holding a lock to respond to a lock break request before forcefully breaking the lock (10 to 180 seconds)
About the Author
You May Also Like