Improve client performance with traditional and lease oplocks overview
Traditional oplocks (opportunistic locks) and lease oplocks enable an SMB client in certain file-sharing scenarios to perform client-side caching of read-ahead, write-behind, and lock information. A client can then read from or write to a file without regularly reminding the server that it needs access to the file in question. This improves performance by reducing network traffic.
Lease oplocks are an enhanced form of oplocks available with the SMB 2.1 protocol and later. Lease oplocks allow a client to obtain and preserve client caching state across multiple SMB opens originating from itself.
Oplocks can be controlled in two ways:
-
By a share property, using the
vserver cifs share create
command when the share is created, or thevserver share properties
command after creation. -
By a qtree property, using the
volume qtree create
command when the qtree is created, or thevolume qtree oplock
commands after creation.