Try Microsoft Edge, a fast and secure browser that's designed for Windows 10 Get started

Microsoft
  • Store
    Store home
    Devices
    • Microsoft Surface
    • PCs & tablets
    • Xbox
    • Virtual reality
    • Accessories
    • Windows phone
    Software & Apps
    • Office
    • Windows
    • Additional software
    • Windows apps
    • Windows phone apps
    Games & Entertainment
    • PC games (disc)
    • Windows digital games
    • Windows phone games
    • Movies & TV
    • Music
    Deals
    • Sale
    • Microsoft Surface deals
    • PC deals
    • Xbox deals
    More
    • Business
    • Students & educators
    • Developer
    • Gift cards
  • Products
    Software & services
    • Windows
    • Office
    • Free downloads & security
    • Internet Explorer
    • Microsoft Edge
    • Skype
    • OneNote
    • OneDrive
    • Microsoft Health
    • MSN
    • Bing
    • Microsoft Groove
    • Microsoft Movies & TV
    Devices & Xbox
    • All Microsoft devices
    • Microsoft Surface
    • All Windows PCs & tablets
    • PC accessories
    • Xbox & games
    • Microsoft Lumia
    • All Windows phones
    • Microsoft HoloLens
    For business
    • Cloud Platform
    • Microsoft Azure
    • Microsoft Dynamics 365
    • Windows for business
    • Office for business
    • Skype for business
    • Surface for business
    • Enterprise solutions
    • Small business solutions
    • Find a solutions provider
    • Volume licensing
    For developers & IT pros
    • Develop Windows apps
    • Microsoft Azure
    • MSDN
    • TechNet
    • Visual Studio
    For students & educators
    • Office for students
    • OneNote in classroom
    • Shop PCs & tablets perfect for students
    • Microsoft in Education
  • Support
Sign in
  • items in cart
items in cart

 Manage my account
 Manage my account
 Ask the community
 Contact us
 Find downloads
Hi, I’m your virtual support agent
Tell me about your problem and I’ll help you find the solution you need.

CV: 548rCEvZQZwxSsGh.0

Configuring opportunistic locking in Windows

  •  Email
  •  Print

Summary

By default, opportunistic locking is enabled for server message block (SMB) clients that run one of the Windows operating systems that is listed in the "Applies to" section. Opportunistic locking lets clients lock files and locally cache information without the risk of another user changing the file. This increases performance for many file operations but may decrease performance in other operations because the server that grants the opportunistic lock must manage the breaking of that lock when another user requests access to the file.

Notes for Windows Vista and later Operating Systems (i.e. Windows 7)
  • The opportunistic locking registry keys are valid only for traditional SMB (SMB1). You cannot turn off opportunistic locking for SMB2. SMB2 was introduced in Windows Vista to enable faster communication between computer that are running Windows Vista and Windows Server 2008 or Windows Server 2008 R2.
  • If you disable opportunistic locking, the offline files feature in Windows Vista or Windows 7 fails.

More Information

Important 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:
322756 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:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\
OplocksDisabled REG_DWORD 0 or 1
Default: 0 (not disabled)
Note 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:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
EnableOplocks REG_DWORD 0 or 1
Default: 1 (enabled)
Note 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
Default: 0
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
Default: 60
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 seconds
Default: 35
Note You must restart the computer for these registry changes to take effect.
Properties

Article ID: 296264 - Last Review: Apr 4, 2011 - Revision: 1

Microsoft Windows Server 2003, Standard Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows Server 2003, Web Edition, Microsoft Windows Server 2003, Enterprise x64 Edition, Microsoft Windows XP Professional, Microsoft Windows XP Tablet PC Edition, Microsoft Windows XP Professional x64 Edition, Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition, Microsoft Windows Small Business Server 2003 Premium Edition, Microsoft Windows Small Business Server 2003 Standard Edition, Windows Server 2008 Datacenter without Hyper-V, Windows Server 2008 Enterprise without Hyper-V, Windows Server 2008 for Itanium-Based Systems, Windows Server 2008 Standard without Hyper-V, Windows Server 2008 Datacenter, Windows Server 2008 Enterprise, Windows Server 2008 Standard, Windows Web Server 2008, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 Standard, Windows Web Server 2008 R2, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate, Windows 7 Enterprise, Windows 7 Professional, Windows 7 Ultimate

Feedback
Thanks! Your feedback will help us improve the support experience.

Support

Support

  • Account support
  • Supported products list
  • Microsoft Lifecycle Policy

Security

Security

  • Safety & Security Center
  • Download Security Essentials
  • Malicious Software Removal Tool

Contact Us

Contact Us

  • Report a support scam
  • Disability Answer Desk
  • Locate Microsoft addresses worldwide
This site in other countries/regions
Algérie - Français
Argentina - Español
Australia - English
Belgique - Français
België - Nederlands
Bolivia - Español
Bosna i Hercegovina - Hrvatski
Brasil - Português
Canada - English
Canada - Français
Chile - Español
Colombia - Español
Costa Rica - Español
Crna Gora - Srpski
Danmark - Dansk
Deutschland - Deutsch
Dominican Republic - Español
Ecuador - Español
Eesti - Eesti
El Salvador - Español
España - Español
Estados Unidos - Español
France - Français
Guatemala - Español
Hong Kong SAR - English
Hrvatska - Hrvatski
India - English
Indonesia (Bahasa) - Bahasa
Ireland - English
Italia - Italiano
Latvija - Latviešu
Lietuva - Lietuvių
Luxembourg - Français
Magyarország - Magyar
Malaysia - English
Maroc - Français
México - Español
Nederland - Nederlands
New Zealand - English
Norge - Bokmål
Panamá - Español
Paraguay - Español
Perú - Español
Philippines - English
Polska - Polski
Portugal - Português
Puerto Rico - Español
România - Română
Schweiz - Deutsch
Singapore - English
Slovenija - Slovenščina
Slovensko - Slovenčina
South Africa - English
Srbija - Srpski
Suisse - Français
Suomi - Suomi
Sverige - Svenska
Tunisie - Français
Türkiye - Türkçe
United Kingdom - English
United States - English
Uruguay - Español
Venezuela - Español
Việt Nam - Tiếng việt
Ísland - Íslenska
Österreich - Deutsch
Česká Republika - Čeština
Ελλάδα - Ελληνικά
България - Български
Казахстан - Русский
Россия - Русский
Україна - Українська
ישראל - עברית
الإمارات العربية المتحدة - العربية
المملكة العربية السعودية - العربية
مصر - العربية
भारत - हिंदी
ไทย - ไทย
中国 - 简体中文
台灣 - 繁體中文
日本 - 日本語
香港特別行政區 - 繁體中文
대한민국 - 한국어
Algérie - Français
Estados Unidos - Español
Perú - Español
Việt Nam - Tiếng việt
Argentina - Español
France - Français
Philippines - English
Ísland - Íslenska
Australia - English
Guatemala - Español
Polska - Polski
Österreich - Deutsch
Belgique - Français
Hong Kong SAR - English
Portugal - Português
Česká Republika - Čeština
België - Nederlands
Hrvatska - Hrvatski
Puerto Rico - Español
Ελλάδα - Ελληνικά
Bolivia - Español
India - English
România - Română
България - Български
Bosna i Hercegovina - Hrvatski
Indonesia (Bahasa) - Bahasa
Schweiz - Deutsch
Казахстан - Русский
Brasil - Português
Ireland - English
Singapore - English
Россия - Русский
Canada - English
Italia - Italiano
Slovenija - Slovenščina
Україна - Українська
Canada - Français
Latvija - Latviešu
Slovensko - Slovenčina
ישראל - עברית
Chile - Español
Lietuva - Lietuvių
South Africa - English
الإمارات العربية المتحدة - العربية
Colombia - Español
Luxembourg - Français
Srbija - Srpski
المملكة العربية السعودية - العربية
Costa Rica - Español
Magyarország - Magyar
Suisse - Français
مصر - العربية
Crna Gora - Srpski
Malaysia - English
Suomi - Suomi
भारत - हिंदी
Danmark - Dansk
Maroc - Français
Sverige - Svenska
ไทย - ไทย
Deutschland - Deutsch
México - Español
Tunisie - Français
中国 - 简体中文
Dominican Republic - Español
Nederland - Nederlands
Türkiye - Türkçe
台灣 - 繁體中文
Ecuador - Español
New Zealand - English
United Kingdom - English
日本 - 日本語
Eesti - Eesti
Norge - Bokmål
United States - English
香港特別行政區 - 繁體中文
El Salvador - Español
Panamá - Español
Uruguay - Español
대한민국 - 한국어
España - Español
Paraguay - Español
Venezuela - Español
  • English (United States)‎
  • Terms of use
  • Privacy & cookies
  • Trademarks
  • © 2017 Microsoft