Enable Oplocks

What oplocks are

Oplocks (opportunistic locks) enable the redirector on a client in certain file-sharing scenarios to perform client-side caching of read-ahead, write-behind, and lock information. A client can, therefore, work with a file (read or write it) without regularly reminding the server that it needs access to the file in question, thereby improving performance by reducing network traffic.

Under some circumstances, if a process has an exclusive oplock on a file and a second process attempts to open the file, the first process must relinquish the oplock and access to the file. The redirector must then invalidate cached data and flush writes and locks, resulting in possible loss of data that was to be written. Oplocks are, therefore, best used in an environment where most operations are reads rather than writes.

Any application that has write-cached data can lose that data under the following set of circumstances:

The cache itself does not have any error handling but the applications do. When an application writes data to the cache, it is always completed. If the cache in turn writes data to the target system over the network, it assumes that the write is completed because, if it does not, the data is lost.

Deciding whether oplocks should be enabled

Disable CIFS oplocks under either of the following circumstances:

After you disable oplocks, the filer stops granting new oplocks and attempts to break all the existing oplocks. If a client does not respond to the filer's oplock break request, you can break the oplocks on that client by disconnecting the filer from that client.

Note: You can turn CIFS oplocks on or off at individual clients. Enabling CIFS oplocks at the filer does not override any client-specific settings.

Enabling/Disabling oplocks

Yes enables opportunistic locks.

No disables opportunistic locks.

The default value for this field is Yes.