"Lazy Close" feature is not working

  • 7016596
  • 11-Jun-2015
  • 21-Aug-2015

Environment

Novell Client 2 SP4 for Windows

Situation

By design, the "Lazy Close" advanced setting for the Novell Client delays the file close on the network allowing the file to be reopened without accessing the network.

Beginning with Novell Client 2 SP4 for Windows, the "Lazy Close" feature has been enabled for use.  Previously, although the "Lazy Close" setting was listed in the Novell Client Properties, it was not truly enabling the intended "Lazy Close" behavior.

Resolution

The Lazy Close feature provides performance benefits for applications that are repeatedly accessing the same files frequently and in rapid succession. Instead of closing a file handle with the NCP server immediately, Lazy Close will wait for a short duration of time, so that if an application wants to immediately re-open the same file again, Novell Client will be able to proceed using the already open NCP file handle without the delay of having to re-open the file on the network.

The Lazy Close feature and the caching of byte-range locks that was introduced in Novell Client 2 SP3 (IR10), intend to further maximize application performance when Novell Client for Windows "File Caching" is enabled. The Lazy Close feature is currently disabled by default, and must be turned on for workstations that use applications which can benefit from this optimization. Also, the Lazy Close feature is always disabled if the File Caching feature is not turned on.

In addition to the previously available ability to enable or disable Lazy Close, several user- several configurable parameters have been added. These additional parameters are optional, and do not require configuration in order to use Lazy Close successfully.  They are available only in case a particular application or usage scenario can be optimized by making further modification to the  default Lazy Close behavior.  It is recommended to leave these parameters at their default values unless advised by Novell Technical Support to change them as part of troubleshooting or a solution.

Settings available under the "Advanced Settings" tab of the Novell Client Properties pages

Lazy Close - When File Caching is enabled, delays the File Close on the network allowing the file to be reopened without accessing the network. This parameter is turned "OFF" by default.

Lazy Close Directory Timeout - This parameter determines the time, in milliseconds, that Lazy Close will delay before closing a directory or volume handle. This parameter is set by default to 2000 milliseconds and has a valid range of 100-15000 milliseconds.

Lazy Close File Timeout - This parameter determines the time, in milliseconds, that Lazy Close will delay before closing a file handle. This parameter is set by default to 500 milliseconds and has a valid range of 100-15000 milliseconds.

Settings available only through editing the registry, and not configurable in "Advanced Settings"

WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows to correct.

The following values may be created under the [HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Client\Parameters] key:

Lazy Close Timeout Resolution - (DWORD 50 - 2000) Determines the time, in milliseconds, that Lazy Close will schedule its evaluations for whether any handles that have been delayed by Lazy Close potentially need to be closed on the NCP server.  Meaning, Novell Client will check at most every "Lazy Close Timeout Resolution"-number of milliseconds whether there are Lazy Close handles that have exceeded their "Lazy Close Directory Timeout" and/or "Lazy Close File Timeout" time to live, and must now be closed "for real" on the NCP server.  By default this value is 100 milliseconds.  Note internally this value will be forced to always be equal or less than the smallest of the "Lazy Close Directory Timeout" and "Lazy Close File Timeout" timeouts that are in effect, regardless of configuration. i.e. If you've lowered either "Lazy Close Directory Timeout" or "Lazy Close File Timeout", but are trying to set "Lazy Close Timeout Resolution" to something higher, it will be "ignored" and forced to be equal to the smallest of the "Lazy Close Directory Timeout" and "Lazy Close File Timeout" values you've set.

Lazy Close Only Files - (DWORD 0 or 1) - When enabled by creating this value and setting it to a DWORD of 1, Lazy Close will only be active for file handles, and not volume or directory handles.  By default when the registry value does not exist, or if it has been created and set to a DWORD of 0, Lazy Close will be active for both file handles and also volume and directory handles.

Lazy Close Only With Oplock I - (DWORD 0 or 1) - When enabled by creating this value and setting it to a DWORD of 1, Lazy Close will only be active for file handles that have successfully acquired a Level I oplock from the NCP server.  By default when the registry value does not exist, or if it has been created and set to a DWORD of 0, Lazy Close will be active of all file handles, even if no oplock or only a Level II oplock has been acquired from the NCP server.  Note the name of this registry value is using the Roman numeral "I" in referring to "Oplock Level I" versus "Oplock Level II", and not the decimal number "1".

and, the following related setting:

File Attributes Cache Timeout - (DWORD 0 to 60000) - Prior to Novell Client 2 SP4 for Windows, if oplock was held, information about the file/subdirectory was cached for only 2 milliseconds. In Novell Client 2 SP4 for Windows, this information is cached for 30 seconds if the oplock is held. By configuring this parameter the 30 second default can be changed from 0 milliseconds to 60000 milliseconds (1 minute).

NOTE: The Lazy Close File and Directory timeouts can be configured if necessary to better reflect a workstation's file access patterns to try and maximize performance improvements.  Making the file timeout longer may help improve performance for applications that take longer before re-opening the same file again.

However, this should usually only be done if the applications are opening the files in a shareable mode, intending to share concurrent access with other users.  In such scenarios, the fact that Lazy Close behavior is keeping the file open longer than a workstation used to will not require the application or other workstations to deal with any situations they aren't already prepared to deal with.

If the applications are attempting to always achieve exclusive, non-shared access, then it may be more optimal to use the default Lazy Close timeout, or in some cases to even lower the timeout value, rather than allowing the workstation's Lazy Close behavior to hold these files open in a non-shared manner for an extended period of time.

Enabling the "Lazy Close Only With Oplock I" setting may also benefit scenarios where an application is sensitive to Lazy Close holding the file open, by limiting the Lazy Close behavior to only those files for which the server has granted a Level I oplock.  All other open file handles will be closed immediately, without further Lazy Close processing or optimization.

Enabling the "Lazy Close Only Files" setting can also be used when troubleshooting, in case an application is being affected by the Lazy Close processing of directory and volume handles instead of actual file handles.

Additional Information