This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
How to back up and restore the registry in Windows
The location of the client registry entry for opportunistic locking has changed from the location in Microsoft Windows NT. In later versions of Windows, you can disable opportunistic locking by setting the following registry entry to 1:
OplocksDisabled REG_DWORD 0 or 1Note
Default: 0 (not disabled)
The OplocksDisabled entry configures Windows clients to request or not to request opportunistic locks on a remote file.
You can also deny the granting of opportunistic locks by setting the following registry entry to 0:
EnableOplocks REG_DWORD 0 or 1Note
Default: 1 (enabled)
The EnableOplocks entry configures Windows-based servers to allow or to deny opportunistic locks on local files. These servers include workstations that share files.
In addition, you can use the following values to tune opportunistic locking for Windows-based computers that have granted opportunistic locks.
The following value specifies the minimum link throughput that the server allows before it disables raw and opportunistic locks for this connection:
MinLinkThroughput REG_DWORD 0 to infinite bytes per second
The following value specifies the maximum time that is allowed for a link delay. If delays exceed this number, the server disables raw I/O and opportunistic locking for this connection.
MaxLinkDelay REG_DWORD 0 to 100,000 seconds
The following value specifies the time that the server waits for a client to respond to an oplock break request. Smaller values allow detection of crashed clients more quickly, but might potentially cause loss of cached data.
OplockBreakWait REG_DWORD 10 to 180 secondsNote
You must restart the computer for these registry changes to take effect.