Workstation Service Entries

You can modify the startup parameters for the Workstation service using the Registry Editor. Unless otherwise indicated, these value entries are found in the following Registry path:

|


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\LanmanWorkstation\Parameters

BufFilesDenyWrite REG_DWORD 0 or 1

Specifies whether the redirector should cache files that are opened with only FILE_SHARE_READ sharing access. Usually, if a file is opened with FILE_SHARE_READ specified, the file cannot be buffered because other processes may also be reading that file. This optimization allows the redirector to buffer such files. This optimization is safe because no process can write to the file.

Disable this parameter if it is necessary to preserve the strict semantics of the sharing modes specified.

Default: 1 (true)

BufNamedPipes REG_DWORD 0 or 1

Indicates whether the redirector should buffer character-mode named pipes.

Disable this parameter to guarantee that all pipe write operations are flushed to the server immediately and to disable read ahead on character-mode named pipes.

Default: 1 (true)

BufReadOnlyFiles REG_DWORD 0 or 1

|


   \CurrentControlSet\Services\LanmanWorkstation

Specifies whether the redirector should cache files that are read-only. Usually, if a read-only file is opened, the file cannot be buffered because other processes may also be reading that file. This optimization allows the redirector to buffer such files. This optimization is safe because no process can write to the file. However, another user can modify the file to enable writing to the file, causing loss of data.

Disable this parameter if it is necessary to preserve the strict semantics of the sharing modes specified.

Default: 1 (true)

CacheFileTimeout REG_DWORD Number of seconds

Specifies the maximum time that a file will be left in the cache after the application has closed the file.

Increase the value of this parameter if you are performing operations on the server that could cause files to be reopened more than 10 seconds after the application has closed them. For example, if you are performing a build over the network, you should increase this parameter's value.

Default: 10

CharWait REG_DWORD 0 to 65535 milliseconds

Specifies time to wait for an instance of a named pipe to become available when opening the pipe.

Increase this value if your pipe server application is typically very busy.

Default: 3600

CollectionTime REG_DWORD 0 to 65535000 milliseconds

Specifies the maximum time that write-behind data will remain in a character-mode pipe buffer.

Changing this value may cause a named pipe application's performance to improve (but it does not affect SQL Server applications).

Default: 250

LockIncrement REG_DWORD Number of milliseconds

This parameter is not used for Win32 applications. However, if OS/2-based applications request that a lock operation waits forever, and if the lock cannot be immediately granted on a non-LAN Manager version 2.0 server, this parameter controls the rate at which the redirector ramps back the failed lock operations.

This parameter should not be changed unless you are running an OS/2-based application that requests lock operations that might fail.

Default: 10

LockMaximum REG_DWORD Number of milliseconds

Used to configure the lock backoff package. This parameter exists to prevent an errant application from "swamping" a server with nonblocking requests where there is no data available for the application.

Default: 500

LockQuota REG_DWORD Bytes of data

Specifies the maximum amount of data that is read for each file using this optimization if the UseLockReadUnlock parameter is enabled.

Increase this value if your application performs a significant number of lock-and-read style operations. (This means performing lock operations and immediately reading the contents of the locked data.) It is conceivable that you could cause the system to run out of paged pool, but only by increasing this value to a few megabytes and by using an application that locks millions-of-byte ranges.

Default: 4096 (bytes)

LogElectionPackets REG_DWORD 0 or 1

Specifies whether the Browser should generate events when election packets are received.

Default: 0 (false)

MailslotBuffers REG_DWORD Number of buffers

Specifies the maximum number of buffers available to process mailslot messages. If your application uses many mailslot operations, set this higher to avoid losing mailslot messages.

Default: 5

MaxCmds REG_DWORD 0 to 255

Specifies the maximum number of work buffers that the redirector reserves for performance reasons.

Increase this value to increase your network throughput. If your application performs more than 15 simultaneous operations, you might want to increase this value. Because this parameter actually controls the number of execution threads that can be simultaneously outstanding at any time, your network performance will not always be improved by increasing this parameter. Each additional execution threads takes about 1K of nonpaged pool if you actually load up the network. Resources will not be consumed, however, unless the user actually makes use of them.

Default: 15

MaxCollectionCount REG_DWORD 0 to 65535 bytes

Specifies the threshold for character-mode named pipes writes. If the write is smaller than this value, the write will be buffered. Adjusting this value may improve performance for a named-pipe application (but it will not affect SQL server applications).

Default: 16

NumIllegalDatagramEvents REG_DWORD Number of events

Specifies the maximum number of datagram events to be logged within the span of time specified by the IllegalDatagramResetTime parameter. Because Windows NT logs all illegal datagrams, the event log can be filled with a proliferation of these in a short time. This entry and the IllegalDatagramResetTime entry work together.

Default: 5

PipeIncrement REG_DWORD Number of milliseconds

Controls the rate at which the redirector "backs off" on failing nonblocking pipe reads.

This parameter is used to prevent an errant application from swamping a server with nonblocking requests where there is no data available for the application. You can use the backoff statistics to tune this parameter to be more efficient for an application that uses nonblocking named pipes (except for SQL Server applications).

Default: 10

PipeMaximum REG_DWORD Number of milliseconds

Controls the maximum time at which the redirector "backs off" on failing non-blocking pipe reads.

This parameter exists to prevent an errant application from swamping a server with nonblocking requests where there is no data available for the application. You can use the backoff statistics to tune this parameter to be more efficient for an application that uses nonblocking named pipes (except for SQL Server applications).

Default: 500

ReadAheadThroughput REG_DWORD Kilobytes per second

Specifies the throughput required on a connection before the cache manager is told to enable read ahead.

Default: 0xffffffff

ServerAnnounceBuffers REG_DWORD Number

Specifies the maximum buffers used to process server announcements. If your network has many servers, you can increase this value to avoid losing server announcements.

This parameter is found under the LanmanWorkstation\Parameters\Static subkey.

Default: 20

SessTimeout REG_DWORD 10 to 65535 seconds

Specifies the maximum amount of time that the redirector allows an operation that is not long-term to be outstanding.

Default: 45

SizCharBuf REG_DWORD 64 to 4096 bytes

Specifies the maximum number of bytes that will be written into a character-mode pipe buffer. Adjusting this value may improve performance for a named-pipe application (but it will not affect SQL server applications).

Default: 512

Use512ByteMaxTransfer REG_DWORD 0 or 1

Specifies whether the redirector should only send a maximum of 512 bytes in a request to an MS-Net server regardless of the servers-negotiated buffer size. If this parameter is disabled, request transfers from the Windows NT redirector could cause the MS-Net server to crash.

Default: 0 (false)

UseLockReadUnlock REG_DWORD 0 or 1

Indicates whether the redirector uses the lock-and-read and write-and-unlock performance enhancements.

When this value is enabled, it generally provides a significant performance benefit. However, database applications that lock a range and don't allow data within that range to be read will suffer performance degradation unless this parameter is disabled.

Default: 1 (true)

UseOpportunisticLocking REG_DWORD 0 or 1

Indicates whether the redirector should use opportunistic-locking (oplock) performance enhancement. This parameter should be disabled only to isolate problems.

Default: 1 (true)

UseRawRead REG_DWORD 0 or 1

Enables the raw-read optimization. This provides a significant performance enhancement on a local area network

Default: 1 (true)

UseRawWrite REG_DWORD 0 or 1

Enables the raw-write optimization. On a LAN, this provides a significant performance enhancement.

Default: 1 (true)

UseUnlockBehind REG_DWORD 0 or 1

Indicates whether the redirector will complete an unlock operation before it has received confirmation from the server that the unlock operation has completed. Disable this parameter only to isolate problems or to guarantee that all unlock operations complete on the server before completing the application's unlock request.

Default: 1 (true)

UseWriteRawData REG_DWORD 0 or 1

Enables the raw-write-with-data optimization. This allows the redirector to send 4 KB of data with each write-raw operation. This provides a significant performance enhancement on a local area network.

Default: 1 (true)

UtilizeNtCaching REG_DWORD 0 or 1

Indicates whether the redirector uses the cache manager to cache the contents of files. Disable this parameter only to guarantee that all data is flushed to the server immediately after it is written by the application.

Default: 1 (true)