Write Caching in Client for Open Enterprise Server

  • 7022029
  • 05-Oct-2017
  • 06-Oct-2017


Client for Open Enterprise Server 2 SP4


When applications are designed to write data using multiple small writes instead of single larger writes, slow performance may be seen when using these applications to save data on an Open Enterprise Server over the NCP protocol.


Previously, the optional "File Caching" feature Client for Open Enterprise Server was caching only network file read operations.  Even with "File Caching" enabled, file write operations from applications were sent immediately to the NCP server without being cached. Beginning with Client for Open Enterprise Server 2 SP4 (IR7), the "File Caching" feature now optionally allows for the enabling of write caching, in addition to read caching.
Write caching is enabled by setting the value of "File Caching" to "Read and Write" under the "Advanced Settings" tab in the Client properties. "File Caching" is set to "Read Only" by default, which is equivalent to the default in previous versions of the Client.
When an application requests to write data, the data is copied into memory and the application is notified immediately that the write operation was successful, so that the application will continue processing and possibly produce additional write operations.  Once the application has ceased producing additional writes, or once a maximum threshold is reached for how long the write data can be delayed, the written data will be sent to the NCP server in the background without the application having to wait for the individual writes to complete.
In addition to the foreground application performance gain from not having to wait for the NCP write operation to occur over the network, the write caching feature also intends to increase network efficiency by combining smaller writes that are adjacent or overlapping into a single larger write operation.

Note that the manner in which this small write aggregation occurs will explicitly preserve the write order and data file integrity.  For example, when a database application writes changes to a file in a specific meaningful order, having write caching enabled does not allow "out of sequence" writes to be combined and written, in a way that might leave the data file corrupt if the write operation were to fail due to network connection loss.

The actual performance impact seen after enabling write caching will depend on whether the application was designed or able to write data in a way that benefits from writes being written in the background, or the aggregation of smaller adjacent and overlapping writes.  Although the default values are recommended and appropriate for creating a good balance of performance versus overhead, it is also possible to change the configuration of the following File Caching related parameters to modify the File Caching behavior.
File Caching Operational Threshold (new parameter) 
This setting establishes the threshold, in kilobytes, for which application read and write requests should be cached.  Application read and write requests which are SMALLER than this value will be cached.  Typically it is more efficient to send applications that read or write a large amount of data as a single request directly to the network, rather than claiming these larger blocks of cache memory away from other applications, which are performing smaller operations and receiving higher benefit from utilizing that cache memory.  Recommended and default value is 128KB. 
Maximum Delayed Writes (new parameter) 
This setting controls the maximum amount of data, in megabytes, that will be allowed to queue for background writing when write caching is enabled.  It is recommended to use a smaller value, as setting larger values may temporarily but significantly impact available Windows kernel mode memory.  Default value is set as 4MB.
Lazy Close (unchanged from previous versions)
When File Caching is enabled, delays the File Close on the network allowing the file to be reopened without accessing the network.
Lazy Close Directory Timeout (unchanged from previous versions)
This parameter determines the time, in milliseconds, that Lazy Close will delay before closing a directory or volume handle.
Lazy Close File Timeout (unchanged from previous versions)
This parameter determines the time, in milliseconds, that Lazy Close will delay before closing a file handle.

Additional Information

Related Windows Registry entries:

File Caching Operational Threshold

Key Name: [HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Client\Parameters]
Value Name: Bypass Cache Threshold In KB
Type: DWORD 32
Data Range: 4 to 1024

Maximum Delayed Writes

Key Name: [HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Client\Parameters]
Value Name: Deferred Writes Max Memory in MB
Type: DWORD 32
Data Range: 1 to 32