|
Performance Registry
Secrets Table of contents |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Abstract In this chapter, you will find specific ways to improve the performance of your general Windows NT system, your network, your file systems, and your printers. Mark Russinovich contributed to this chapter, selecting some of his favorite performance-oriented registry modifications to help you squeeze every drop of power from your Windows NT machines. GENERAL SYSTEM PERFORMANCE The tuning parameters in this section tune the general performance of NT, rather than a specific aspect of NT such as file systems or memory. By our definition, these keys tune NT itself, not specific device drivers or user-level applications. VI-1 Managing the number of threads can help you optimize performance. When NT boots, it creates a pool of worker threads that NTs kernel, Executive Subsystems, and device drivers use. When one of these components places a work item, such as the Cache Managers lazy cache flusher or the Memory Managers idle memory zero-filler, in a queue, a thread is assigned to process it. If too many threads are in the pool, they needlessly consume system resources. However, if not enough threads are in the pool, work items are not serviced in a timely manner. Adjust the following two registry keys to change the number of threads.
The number you specify in the value increases the number of threads created for the specified work queue. NT has two thread queues. Threads in the Critical Work Queue execute in the low real-time priority range, so they have precedence over most system activity. Threads in the Delayed Work Queue have a slightly lower priority that results in higher latency the threads that service it compete with other processing for CPU time. The number of threads created for each queue is based on two criteria: whether the system is a server or workstation and how much physical memory the system has. You cant tell directly whether more threads in a particular situation give you better performance, but you can experiment with benchmark workloads to see if they provide a benefit. VI-3 To make your foreground windows more responsive than your background windows, in Windows 3.51 you could boost priorities. In NT 4.0 Workstation, instead of boosting priorities, you set quantums to boost foreground windows (Server treats foreground and background windows alike). Change this registry entry to set the boost value.
You can also set the boost value with a slider in the Performance tab of the System Control Panel applet. Valid values are shown below.
VI-4 Heres a tricky registry entry.
Although you cant use this value to enhance performance, its name implies that you can. This value actually encodes expiration data about NT Beta and Release Candidates. MEMORY PERFORMANCE When you think of memory performance, fast SRAMs and multilevel caching come to mind. Although these hardware components play a critical role in the latency and throughput of a computers memory subsystem, tweaking the Registry obviously cannot upgrade your machines hardware. So in this section, improving memory performance means improving the way NT uses physical and virtual memory. You know youre experiencing memory problems that you can fix with registry entries, rather than additional hardware, when you get not enough memory to complete task messages in the system Event Log or on the display monitor. VI-5 The file system cache grows and shrinks as the applications memory demands change. However, at system startup, the caches minimum, maximum, and ideal sizes are calibrated based on the Registry value you set below.
This value controls the size of the systems file system cache. A value of 0 indicates a small cache, which is the default setting for Workstation, while 1 indicates a large cache, which is the default setting for Server. Servers usually perform some file sharing and therefore require a larger cache. VI-6 NT categorizes memory as either paged or nonpaged. Paged memory holds data that can temporarily be moved from physical memory to the systems paging file if space is needed for different data in physical memory. Nonpaged memory stores data that must be present in physical memory at all times. NT allocates a portion of physical memory for nonpaged memory when the system starts up, and this allocation cant grow. If drivers or NT exhaust this storage, the system may become unstable or operations may start to fail. Modifying these two registry entries lets you override the defaults set for the paged and nonpaged pools.
This value is the number of bytes of physical memory you want to allocate for nonpaged memory. To monitor your memory, use Performance Monitor to watch the percentage of committed memory thats used. If more than 80 percent of memory is used consistently, you should increase this value. Likewise, if the systems nonpaged memory usage is low, reducing the amount allocated for it increases system performance.
This value is the number of bytes in the paged memory pool. It overrides the systems default calculation, which is roughly equal to the physical memory on Workstation and a minimum of 50 MB on Server. Paged pool is different from virtual memory size the paged pool is space reserved in the systems virtual memory map for NT and device drivers to allocate pageable data. You can monitor the amount of paged pool the system uses with the Performance Monitor, which also shows the maximum allocation possible. If the amount of memory used is consistently more than 80 percent, you should use this setting to override the default. NETWORKING PERFORMANCE The registry gives you lots of control over Windows NTs various networking components. Because your system may not run every networking service, you should identify which components are active so that you can target them when evaluating networking performance with tools like Performance Monitor. General Networking VI-8 This value controls the order in which your network redirectors are used. If you have more than one network redirector, such as Lanmanager Workstation or Client Services for NetWare, loaded on your system, you should consider changing this entry.
In this value, you set the order in which the WNet API uses your network providers. When the WNet API is called, it processes requests by sending them to each network provider in the order listed. If it gets back a response that the provider doesnt process that type of request, the API calls the next provider listed. Thus, if most of your systems activity relates to accessing NetWare shares, you should move the NetWare provider name to the start of the list. This small modification can improve performance significantly. Redirector The Windows NT Redirector manages remote volume connections. When you access a volume across the network, Redirector takes the file system request and invokes the appropriate protocol to send the request to a file system server component on the other machine. VI-9 The entry below switches the behavior of Redirector between write-through and write-behind. By default, Redirector delays sending the server write requests to a volume, which lets other operations proceed or complete. When you change this value, Redirector sends write operations immediately and waits for a response before proceeding with other operations.
To disable write-behind, change this value to 1; the default is 0. You may need to use this highly synchronous mode in specialized environments or when tracking down networking problems with a network monitoring tool; otherwise, you should use the write-behind value because write-through degrades performance. VI-10 The value in the registry entry below is a hybrid between write-through and write-behind modes.
The default value of 1 enables asynchronous write-behind, which means that Redirector immediately sends write requests to the server but doesnt wait for a response before processing other requests. Changing the value to 0 disables asynchronous write-behind; you should disable it only when the network requires special coherency guarantees or when youre debugging. Lanmanager Workstation Lanmanager Workstation is Microsofts implementation of a Redirector. It speaks SMB (Server Message Block).
This value specifies the number of threads that the Workstation service creates during initialization to handle requests; the default value is 15. If Workstation has more requests than it has threads to service those requests, it holds up some requests until a thread finishes servicing a request. Therefore, if multiple users or applications are simultaneously accessing remote shares, increasing this value can improve network throughput.
This value sets the number of seconds after a request is queued before Lanmanager indicates that the request has failed (if it hasnt been processed). The default value is 45. Applications that access network shares may report not having enough memory to process a request too many outstanding operations are on the volume and some requests are timing out. Raising this value lets more operations be serviced asynchronously and may cause the messages to go away.
This value specifies the time after which Lanmanager Workstation purges its locally cached data after closing a file. Many applications open files, perform an operation, close them, and repeat this sequence to perform more operations. If you have a system with a dedicated application, you can adjust this value to improve performance. Increase the time if applications close and reopen the same files at intervals longer than 10 seconds, and reduce the time if applications access few files and do not open and close them regularly.
This value sets the number of files that Lanmanger leaves open in the file system cache after an application closes it. By default, Lanmanager Server allows only a certain number of open files from any one Lanmanager Redirector connection. Having a file open on the connection can improve performance if the application opens it again. However, keeping files open can also overload the servers limit, and in those cases you should reduce this value. VI-15 Normally, Lanmanager Workstation reads and stores data in the local file cache before an application requests it. These read-aheads can cause network degradation when applications rarely read files sequentially on shared volumes or when the networks throughput is low. To better manage the read-ahead function, change this registry entry.
This value sets the minimum network throughput, in kilobytes per second, before Lanmanager Workstation enables the read-ahead function. The default value is -1. Lanmanager Server Lanmanger Server is Microsofts implementation of an SMB (Server Message Block) file server. It is a focal point of performance tuning for any file-sharing server. VI-16 If you frequently get server paged or server nonpaged errors in Performance Monitor, you are seeing Lanmanager Server running out of memory that its allocated for itself. You may want to raise these values to give Lanmanager Server more memory; however, giving these memory resources to Lanmanager keeps other system drivers and applications from using them. To give Lanmanager more paged and nonpaged memory, change the registry entries below.
These values set the number of megabytes allocated by Lanmanager Server for nonpaged and paged memory. The default, which is determined internally, is 0. VI-18 By default, Lanmanager Servers worker threads run at one priority level higher than typical application threads. If network throughput is low because the Servers threads are competing with other threads for processor time, you may want to change this registry entry to increase the priority boost.
Valid values are 0, 1, or 2, which determine how many levels above normal priority Lanmanagers worker threads run; and 15, which makes Lanmanager Servers threads run at real-time priority. Increasing the priority may reduce the responsiveness of other applications and services on the machine, especially if you set it to real-time priority. VI-19 When the server maintains extra pre-initialized end-points, establishing new connections takes less processing. This value sets the number of end-points the server maintains.
Valid values range from 2 to 5; the default is determined internally. You can reduce the value to minimize idle memory overhead when the memory resources on the system are in high demand. VI-20 If memory resources are scarce or if you want to limit the total number of users that can simultaneously log on to the server, change this registry entry.
The value is the number of users who can long on to the server simultaneously. VI-21 Every time a connection is made to Lanmanager Server, resources are allocated to service it. Sometimes idle connections tie up resources for a long time. To free resources sooner, change this registry entry.
This value specifies the number of minutes a connection can be idle before it is automatically disconnected and the resources associated with it are freed. The default value is 15. Reducing this value can keep resource usage to a minimum, but its possible to incur additional overhead if clients reconnect after their connections are dropped. VI-22 The registry entry below tells Lanmanager Server to allocate work items for processing raw SMBs (Server Message Blocks).
Setting this value to 1 (the default) enables support for raw SMBs, and performance improves. Setting this value to 0 disables support. VI-23 Opportunistic locking is a performance-enhancing protocol Windows NT file systems use to detect remote machines modifications to shared files and directories. Enabling op-locks can cause you to lose cached data if the system fails.
The default value is 1, which enables op-locking. Change the value to 0 to disable this feature. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page: 1, 2 |
next page |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||