Pages

8/23/2007

Opportunistic File Locking

http://www.jsifaq.com/SF/Tips/Tip.aspx?id=3108

http://support.microsoft.com/kb/129202

Disabling Read Caching on Windows Workstations

The Windows registry entry that controls read caching on Windows network clients is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VxD\VREDIR
DiscardCacheOnOpen REG_BINARY 0 or 1
Default: 0 (not disabled)


To disable read caching, the value of DiscardCacheOnOpen must be set to 1.

If you do change this Registry value, you will have to reboot the PC to ensure that the new setting goes into effect.

Disabling Opportunistic Locking on Windows Servers

There are 2 Windows registry entries that control opportunistic locking (oplocks) on Windows network servers:
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOpLockForceClose
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOplocks

1. EnableOpLockForceClose

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
EnableOpLockForceClose REG_DWORD 0 or 1
Default: 0 (not disabled)

To disable oplocks, the value of EnableOpLockForceClose must be set to 1.

2. EnableOplocks

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
EnableOplocks REG_DWORD 0 or 1
Default: 1 (true)
To disable oplocks, the value of EnableOplocks must be set to 0.


Note: The location of the registry entry for opportunistic locking has changed in Windows 2000 from the earlier location in Microsoft Windows NT. In Windows 2000, the registry entry that disables opportunistic locking is:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\
OplocksDisabled REG_DWORD 0 or 1
Default: 0 (not disabled)
To disable oplocks, the value of OplocksDisabled must be set to 1.


Note: Windows 2000 will still respect the EnableOplocks registry value used to disable oplocks in earlier versions of Windows.

Disabling Opportunistic Locking on Windows Workstations

If you use a Windows NT family workstation in place of a server, you must also disable opportunistic locking (oplocks) on that workstation. For example, if you use a PC with the Windows NT Workstation operating system instead of Windows NT Server, Windows 2000 Professional instead of Windows 2000 Server, or Windows XP Home instead of Windows XP Professional you will need to disable oplocks on that system.

The major difference is the location in the Windows registry where the values for disabling oplocks are entered. Instead of the LanManServer location, the LanManWorkstation location is used here.

There are 2 Windows registry entries that control opportunistic locking (oplocks) on Windows network workstations:

1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters EnableOpLockForceClose
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters EnableOplocks

1. EnableOpLockForceClose
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
EnableOpLockForceClose REG_DWORD 0 or 1
Default: 0 (not disabled)

To disable oplocks, the value of EnableOpLockForceClose must be set to 1.

2. EnableOplocks
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManWorkstation\Parameters
EnableOplocks REG_DWORD 0 or 1
Default: 1 (true)
To disable oplocks, the value of EnableOplocks must be set to 0.

No comments: