Chapter 14

Optimizing Network Server Performance

Previous chapterNext chapterContents


In this chapter, you learn to

Although it's a relatively easy task to set up a Windows NT 4.0 server and connect printers and workstations to form a network, it's not as easy to tune your network for maximum performance. Because Windows NT Server 4.0 is not only a file server but also an application server, you must monitor many performance parameters to ensure that your network doesn't grind to a halt.

Fortunately, Microsoft now includes a very powerful tool, Performance Monitor (PerfMon), with Windows NT Server 4.0. Performance Monitor, which originated in Microsoft System Management Server 1.0, lets an administrator view the workings of virtually every component of your Windows NT 4.0 server and network. Performance Monitor also is included with Windows NT Workstation 4.0.

This chapter is divided into two principal sections. The first section, "Using Performance Monitor," helps you understand how Performance Monitor works and how to use the options available to the network administrator. The second major section, "Optimizing Windows NT 4.0 File and Print Servers," illustrates how to monitor specific characteristics of your network and computers using Performance Monitor and provides tips to obtain better network performance.

Using Performance Monitor

Performance Monitor monitors the operating characteristics, such as system memory consumption and processor usage, of a computer running Windows NT. The data gathered can be displayed as charts, used to generate alerts, and saved in files for later analysis.

To start Performance Monitor, choose Programs, Administrative Tools, and then Performance Monitor from the Start menu. The Performance Monitor program window appears (see fig. 14.1). By default, no objects are monitored.


14.1

Performance Monitor's opening window displaying % Processor Time.

Figure 14.1 shows the Processor object being monitored. Later in this chapter, the "Creating a New Chart" section shows you how to monitor objects such as the Processor.

Using Objects and Counters in Performance Monitor

Performance Monitor records the behavior of objects in the system by the use of counters. In Windows NT, an object is a standard entity for identifying and using a system resource. Examples of objects are individual processes, shared memory, and physical devices. Like programming objects, Windows NT objects usually have data (properties) and behavior (methods); most counters record the rate (or a related unit) at which a particular method executes. As an example, a counter displays the number of fixed-disk read operations (methods) per second.

Performance Monitor provides a specific set of counters for each object type. The counters provide statistical information for each of the object types. Table 14.1 lists the most important objects of Windows NT (memory, the paging file, the physical disk, and the processor), the counters associated with each object, and the significance of each counter.

Table 14.1 The Most Important System Objects and Counters of Windows NT 4.0

Counter Description Significance

Memory

Available Bytes The amount of virtual memory now available When the value falls below a threshold, Windows NT gradually takes memory from running applications to maintain a certain minimum of available virtual memory.
Pages/Sec The number of pages that had to be written to or read from the disk and placed in physical memory This counter indicates whether more physical memory is needed in your system. A value greater than 5 for a single disk could indicate a memory bottleneck.
Page Faults/Sec The number of page faults in the processor This value indicates that the data needed wasn't immediately available on the specified working set in memory.

Paging File

% Usage The amount of the paging file (Pagefile.sys) that's in use This counter indicates whether you should increase the size of Pagefile.sys. If this value is near 100 percent, increase the size of the paging file.
% Usage Peak The peak usage of system paging This value also indicates whether the paging file is of the appropriate size. If this value nears the maximum age-file size, increase the size of the paging file.

Physical Disk

Avg. Disk Bytes/ Transfer The average number of bytes transferred to or from disk during read/write operations Low values of this counter indicate that applications are accessing the disk inefficiently. If this value is greater than 20K, the disk drive is performing
Avg. Disk Sec/Transfer The amount of time a disk takes to fulfill requests A high value can indicate that the disk controller is continually retrying the disk because of read or write failures. A high value is greater than 0.3 second.
Disk Queue Length The number of disk requests outstanding at the time the is collected This value relates to the number of spindles that make up the physical disk. A single disk has one spindle. RAID drives have multiple spindles but appear as a single drive. A typical value is up to two times the number of spindles making up the physical disk.
% Disk Time The percentage of time that the disk is in use If this value consistently is above 85 percent active, consider moving some files to an additional server or upgrading the disk drive.

Processor

% Processor Time The percentage of elapsed time that a processor is busy executing a non-idle thread This counter indicates how busy a processor is. If this value is very high, the system may benefit from a processor upgrade or multiple processors.
Interrupts/ Sec The rate of service requests from I/O devices This indicates the number of requests processed from device drivers. If this value increases without corresponding increases in system activity, it could indicate a hardware problem in the system.

You can monitor multiple instances of some of the objects listed in table 14.1. For example, you can view the performance of each processor in a multiprocessor system. You also can monitor each Physical Disk object in a system with multiple fixed-disk drives.

Multiple instances of an object can be opened, even if multiple physical devices don't exist in the system. For example, multiple Processor objects can be monitored on a single-processor system; in this case, each instance of the processor displays the same data.

One of the most important capabilities of Performance Monitor is the capability to monitor the performance of Windows NT objects on remote machines. For example, from a client running Windows NT Workstation 4.0, a system administrator can monitor the performance of objects on all the Windows NT servers in a domain. This feature is very useful for detecting load-balancing problems in the network.

You monitor behavior of a remote computer's objects by following these steps:

  • If Performance Monitor isn't displaying a chart, choose Chart from the View menu.
  • Choose Add to Chart from the Edit menu to open the Add to Chart dialog (see fig. 14.2).

  • 14.2

    Adding a chart to Performance Monitor with the Add to Chart dialog.

  • In the Add to Chart dialog's Computer text box, type the computer name of the Windows NT computer to monitor. Alternatively, click the button to the right of the text box to display the Select Computer dialog, which displays a list of all computers on the network (see fig. 14.3).
  • If you use the Select Computer dialog, double-click the name of the domain or workgroup to display a list of servers and workstations in that entity. Select the name of the server or workstation to monitor, and then click OK to close the dialog.

  • 14.3

    Using Performance Monitor's Select Computer dialog to select other computers on the network.

  • In the Add to Chart dialog, a new chart is added to Performance Monitor by selecting an object from the Object drop-down list, selecting a counter for the object from the Counter list, and then clicking the Add button. Figure 14.2 shows the Processor object and % Processor Time counter selected.
  • Click Cancel to close the Add to Chart dialog. The line chart begins to display % Processor Time (refer to fig. 14.1).
  • Charting Performance Characteristics

    Performance Monitor typically creates line charts, but histograms or bar charts are alternatives for certain types of data. When using charts, Performance Monitor displays the collected statistical data near the bottom of the window in the value bar.

    The value bar contains the following information:

  • Last shows the most recent reading that was taken.
  • Average displays the average of all data readings taken since the chart was created.
  • Min shows the lowest reading that was taken.
  • Max displays the highest reading that was taken.
  • Graph Time shows the amount of time that one chart on-screen covers.
  • Creating a New Chart.

    Creating a new chart requires that you select a computer, object, and counter to monitor. The following example illustrates creating a new chart using the Processor object and % Processor Time counter. Monitoring the percentage of processor time consumed indicates whether the server's CPU is overworked. Such a condition indicates that the server needs a faster processor or that some of the work performed by this server should be distributed to another server.

    To create a new line chart for monitoring % Processor Time, follow these steps:

  • Choose Chart from the View menu or click the View a Chart button on the toolbar.
  • If a chart already exists, you can clear it by choosing New Chart from the File menu.

  • A new line representing the object being monitored is added to the chart by choosing Add to Chart from the Edit menu or by clicking the Add Counter button in the toolbar. The Add to Chart dialog appears. (You must complete the rest of the steps before the new line appears in Performance Monitor.)
  • In the Computer text box, type the computer name of the system to monitor, or click the button to the right of the text box to open the Select Computer dialog, which shows all computers on the network (refer to fig. 14.3).
  • In the Add to Chart dialog, select the object you want to monitor from the Object drop-down list. In this example, choose the Processor object. When you select an object, the Counter list box fills with the appropriate counters for that object.
  • Select the counter that you want to monitor from the Counter list. In this example, select the % Processor Time counter. When you select a counter, you can see a explanation of what the counter represents by clicking the Explain button.
  • If the computer has more than one CPU, the Instance list box fills with an instance for each CPU. Select the instance to monitor. In this example, select 0 for the first CPU.
  • You can choose the Color of the object, the Scale factor, the line Width, and the line Style. These options enable you to identify more distinctly each counter when the same chart is monitoring more than one counter.
  • Click the Add button to add the new performance characteristic to be monitored to the chart.
  • You can add more performance characteristics to the chart by repeating steps 3 through 8.
  • 10. After you add all the objects that you want to monitor, click the Cancel button to return to the Performance Monitor window. Performance Monitor now begins monitoring the chosen objects.
  • To obtain the most realistic readings from your system, make sure that tasks such as screen savers are disabled. Depending on the object being monitored, an active screen saver distorts the readings.

    Editing a Chart.

    When your chart is running, you can edit any of the counters being monitored. As shown in figure 14.1, a legend of all counters being monitored appears at the bottom of Performance Monitor's window. To edit any counter, follow these steps:

  • Select the counter to be edited from Performance Monitor's legend at the bottom of the window.
  • From the Edit menu choose the Edit Chart Line command, or double-click the counter in Performance Monitor's legend. The Edit Chart Line dialog appears (see fig. 14.4).
  • The Edit Chart Line dialog looks similar to the Add to Chart dialog but doesn't allow for Computer, Object, Counter, or Instance changes. The only changes that you can make are to the Color, Scale, Width, and Style of the line representing the object being edited. Make the appropriate changes and click OK.

  • 14.4

    Using the Edit Chart Line dialog to modify a counter.

    Deleting Monitored Objects from a Chart.

    It often becomes necessary to delete objects from the chart during the course of monitoring system performance. You may need to delete an object due to inconclusive results obtained from the object, or simply to clear a chart that's monitoring many performance characteristics. Any counter being monitored can be deleted by following these steps:

  • Select the counter to be deleted from Performance Monitor's legend.
  • Choose the Delete From Chart command on the Edit menu, or press the Delete key.
  • Customizing the Chart Options.

    Several options are available for Performance Monitor charts that modify the presentation of the chart display. To modify the chart options, choose Chart from the Options menu. The Chart Options dialog appears (see fig. 14.5). Table 14.2 describes all the available chart options.


    14.5

    Customizing the presentation of Performance Monitor charts using the Chart Options dialog.

    Table 14.2 Options for Modifying Charts

    Chart Options Description
    Legend If this option is selected, the legends for each chart line appear at the bottom of Performance Monitor.
    Value Bar If this option is selected, the value bar shows the values of Last, Average, Min, Max, and Graph Time.
    Gallery The Gallery setting determines how the data is displayed. The options are Graph, which is the default and most useful method, or Histogram, which displays the data as a bar graph.
    Update Time The Periodic Update setting, the most commonly used method, tells Performance Monitor to read new data at the time interval specified in the Interval (Seconds) text box. Manual Update tells Performance Monitor to update on user request.
    Vertical Grid This option displays grid lines on the vertical axis.
    Horizontal Grid This option displays grid lines on the horizontal axis.
    Vertical Labels This option displays labels for the vertical (y) axis.
    Vertical Maximum This option specifies the maximum value for the vertical axis. This value should be changed to reflect the counter being monitored. For example, set Vertical Maximum to 100 when using a percentage counter.

    Using Performance Monitor to Set Alerts

    One of the useful features of Performance Monitor is the capability to define alerts, which can be sent to any station on the network when a monitored counter reaches a critical value. An alert is a method of monitoring any counter and performing a specified action when the counter exceeds or falls below a predetermined threshold value. You can choose to log the alert, send a notification message to a user on the network, or run an application.

    You can view the alerts defined by Performance Monitor by either

  • Choosing Alert from the View menu
  • Clicking the View the Alerts button of Performance Monitor's toolbar
  • Figure 14.6 shows alerts generated at five-second intervals for % Processor Time counter values in excess of 5 percent.


    14.6

    Viewing alerts in Performance Monitor's alert view.

    Adding an Alert.

    You add alerts to Performance Monitor by performing steps similar to the steps used for adding charts to Performance Monitor. To add a new alert to the view, follow these steps:

  • To create a new alert view, choose Alert from the View menu, or click the Alert toolbar button.
  • Creating a new alert will remove any existing charts that Performance Monitor is displaying.

  • Choose Add to Alert from the Edit menu, or click the Add button, to add a new alert to the view. The Add to Alert dialog appears (see fig. 14.7).

  • 14.7

    Adding alerts with the Add to Alert dialog.

  • Type the computer name of the system to monitor in the Computer text box, or click the button to the right of the text box to open the Select Computer dialog, which shows all computers on the network (refer to fig. 14.3).
  • From the Object drop-down list, select the object that you want to monitor. In this example, choose the Processor object. When an object is selected, the Counter list box fills with the appropriate counters for that object.
  • Select the counter that you want to monitor from the Counter list box. In this case, select the % Processor Time counter.
  • When you select a counter, you can see an explanation of what the counter represents by clicking the Explain button.

  • If the computer has more than one CPU, the Instance list box fills with an instance for each CPU. Select the instance to monitor. In this example, select instance 0 for the first CPU.
  • Select a Color for the alert.
  • Enter the alert threshold in the Alert If section, and specify whether the alert is to run if the value is Under the threshold or Over the threshold.
  • When the alert triggers and if an application is supposed to run, specify the application name in the Run Program on Alert text box. Indicate whether the alert is to be run the First Time the alert triggers or Every Time the alert triggers.
  • 10. When the options are set, click the Add button to add the alert to Performance Monitor.
  • Customizing Alerts.

    As with charts, alerts can also be customized with a variety of options. Choosing Alert from the Options menu opens the Alert Options dialog (see fig. 14.8). Table 14.3 describes the available alert options.


    14.8

    Setting alert options with the Alert Options dialog.

    Table 14.3 Actions That Can Be Performed When an Alert Is Triggered

    Alert Option Description
    Switch to Alert View Performance Monitor switches to alert view when an alert is triggered.
    Log Event in Application Log Performance Monitor generates an entry in the Application Log when the alert is triggered. You can view the Application Log from Event Monitor.
    Send Network Message Performance Monitor sends a network message to the machine specified in the Net Name text box. Don't enter double backslashes (\\) before the machine name.
    Update Time Two options are available here. The first and most used is Periodic Update, which tells Performance Monitor to read new data at a time interval specified in seconds in the Interval (Seconds) text box. Manual Update tells Performance Monitor to update on user request.

    Performance Monitor uses NetBIOS as the transport protocol for network messages. If your alerts are sending network messages, you must ensure that NetBIOS is available as a transport protocol and that the NetBIOS service is running. The NetBIOS messenger service must be running for alerts to send network messages. The NetBIOS messenger service is alerted of the intended recipients.

    You can determine whether the NetBIOS messenger service is started by using Control Panel's Services tool. The service name Messenger appears in the list box of all services, along with the current status of the service. If this service doesn't appear, you must install the NetBIOS Interface protocol by using Control Panel's Network tool.

    The following two methods start the Messenger service:

  • From the Command prompt, type net start messenger.
  • In Control Panel, double-click the Services tool. Then select the Messenger service from the list box displaying all services and click the Start button. You can change the startup properties of the service to have it start automatically when the computer boots.
  • After the Messenger service starts, make sure that the alert recipient is added by typing net name machinename add, where machinename is the name you typed in the Net Name text box in the Alert Options dialog.

    Using Performance Monitor Log Files

    You use log files to provide a history of how your network is operating. You can set up Performance Monitor to keep a log for the results of running charts and of alerts that occur.

    Maintaining log files can ease the burden of network administrators as the network grows and performance begins to degrade. You can examine log files to determine the source and location of bottlenecks and devise plans for correcting the problems.

    Recording Data to a Log File.

    To record data to a log file, follow these steps:

  • Select the log view by choosing Log from the View menu or by clicking the View Output Log File Status toolbar button. Performance Monitor displays a new log view window (see fig. 14.9).

  • 14.9

    Displaying current log activity in log view.

  • From the File menu, choose New Log Settings to clear existing log settings.
  • A new log file is added by choosing Add to Log from the Edit menu or by clicking the Add toolbar button. The Add To Log dialog appears (see fig. 14.10).

  • 14.10

    Adding objects to be logged through the Add To Log dialog.

  • Type the computer name of the system to monitor in the Computer text box, or click the button to the right of the text box to open the Select Computer dialog, which shows all computers on the network (refer to fig. 14.3).
  • From the Objects list box, select the object that you want to monitor. In this example, choose the Processor object. Unlike in chart view, when an object is selected, all instances of the object are logged.
  • After you select the object you want to log, click the Add button to add the object to the log.
  • To log multiple objects, repeat steps 5 and 6 for each object. Then click Cancel to close the dialog.
  • Now that the objects to log are selected, the log file needs to be set. This is done through the Log Options dialog (see fig. 14.11), which you can open by choosing Log from the Options menu.

  • 14.11

    Setting log options in the Log Options dialog.

  • Enter a new log file name, or select an existing log file to overwrite from the Log Options dialog.
  • In the Update Time section, either select Periodic Update and set a time interval in seconds, or select Manual Update for user intervention. These selections determine when data is written to the log file.
  • Click the Start Log button to start logging data. Performance Monitor's window changes to the log view.
  • To stop data logging, open the Log Options dialog and click the Stop Log button.

    Viewing Recorded Data.

    Logged data, unlike chart data, doesn't appear in Performance Monitor's window. You can open for viewing only log files that aren't currently opened (in the process of logging). If the log you want to view is in use, you must first stop the log by choosing Log from the View menu. Then choose Log from the Options menu to open the Log Options dialog and click Stop Log.

    To view the log data, follow these steps:

  • Choose the Data From command from the Options menu to open the Data From dialog (see fig. 14.12).

  • 14.12

    Changing where the viewed data is retrieved from in the Data From dialog.

  • Select the Log File option.
  • Type the path and name of the log file to view in the text box, or click the button to the right of the text box to find the log file.
  • Click OK to close the Data From dialog.
  • To specify a time frame to view within the log file, choose Time Window from the Edit menu to open the Input Log File Timeframe dialog (see fig. 14.13). The bar above the Bookmarks section indicates the time line for logging events in the file. The Bookmarks section lists events when data was logged. The default is the entire time span for the log file.

  • 14.13

    Altering the time span for viewing logged data in the log file.

  • To set a new start time, select a bookmark and click the Set As Start button.
  • To set a new end time, select a bookmark and click the Set As Stop button.
  • Click OK to close the Input Log File Timeframe dialog and display the logged data.
  • To resume viewing current activity, you must open the Data From dialog and select the Current Activity option.

    Optimizing Windows NT 4.0 File and Print Servers

    Microsoft's developers made an appreciable improvement in Windows NT Server 4.0's file and print services compared with Windows NT 3.5x, especially for high-speed networks using 100BaseT NICs. However, various hardware and software bottlenecks can still reduce the performance of Windows NT 4.0 file and print servers. The following sections describe the process of optimizing a Windows NT Server 4.0 used primarily for file and print sharing.

    See "Faster File Sharing on High-Speed LANs,"(Ch. 1)

    See "Printing Enhancements," (Ch. 1)

    Minimizing Disk Bottlenecks

    Fixed-disk drives contribute more than their share of performance problems. You use Performance Monitor's Physical Disk object to check for drive bottlenecks.

    Unlike the other objects in Performance Monitor, the disk subsystem must be initialized before disk activity can be monitored. To activate the monitoring of the disk subsystem, follow these steps:

  • From the Start menu, choose Programs and Command Prompt to open the Command Prompt window.
  • On the command line, type diskperf -y.
  • Exit the command line by typing exit or by closing the Command Prompt window.
  • Shut down and restart Windows NT.
  • If the DiskPerf driver isn't started by performing the preceding steps, the Physical Disk's counters don't work. Failure to start DiskPerf becomes evident when a chart is selected for the physical disk, and the graph doesn't indicate activity during disk operations.

    One of the most obvious counters of the Physical Disk object is the % Disk Time counter, which is the equivalent to monitoring the computer's disk activity LED. When the % Disk Time approaches 80 percent or higher, the server has a disk-usage problem and is said to be disk-bound.

    Another useful counter is Disk Queue Length, which counts the number of processes waiting to use the physical disk. When more than two processes are regularly waiting to access the disk, the server is disk-bound.

    The following sections describe hardware and software solutions for disk-bound file and print servers.

    Hardware Solutions for Reducing Disk Bottlenecks.

    Buying SCSI-2 or, better yet, SCSI-3 fixed-disk drives with fast seek times is the most straightforward solution for increasing data throughput. Many disk drives are available with 4M/sec (4M per second) sustained data transfer rates or greater and 9 ms seek times or less. For example, 4.3G Seagate ST15150W Wide SCSI-2 Barracuda drives can provide a sustained data rate in the range of 6M/sec, which is several times more data than you can transport over 10BaseT media. A large read cache on high-speed drives also improves performance, and enabling a drive's write cache provides a performance boost, but at the expense of data security. The primary advantage of high-speed drives in relatively low-speed networks is that the system devotes less time to reading and writing data, which is only a part of the processor and network workload.

    See "Disk Subsystems," (Ch. 5)

    See "RAID 5," (Ch. 7)

    If your Avg. Disk Sec/Transfer rate is significantly below that calculated for your drive/controller combination, you might have a SCSI termination problem that results in multiple reads or writes as a result of data errors. Active termination is a requirement for high-speed SCSI drives. If the last device on your SCSI chain uses passive termination, it's likely to reduce the effective data rate. If you mix Wide and conventional (narrow) SCSI devices on a host adapter that supports both cable types, such as the Adaptec AHA-2940UW, be sure to follow the manufacturer's recommendation for mixed-SCSI device address settings. Using the wrong addresses for low-speed devices can slow high-speed devices dramatically.

    SCSI host controllers represent another potential hardware bottleneck. Attaching a high-performance drive to a legacy SCSI controller (such as an 8-bit SCSI controller) doesn't make economic sense. PCI bus-mastering controllers, such as the Adaptec AHA-2940UW and AHA-3940UW, provide synchronous data access at burst rates of up to 40M/sec and 80M/sec, respectively. You can attach up to 15 devices to a Wide SCSI-2 bus. Replacing Windows NT Server 4.0's software RAID implementation with a controller that implements hardware RAID also improves disk subsystem performance.

    See "Hardware RAID Implementations," . (Ch. 7)

    Some SCSI host adapters can perform asynchronous I/O, which allows drives to perform operations in parallel. If your host adapter can perform asynchronous I/O, you can use stripe sets to maximize the server's performance. A stripe set allows data to be distributed across several drives, making disk operations very fast because the physical drives work in parallel.

    When buying a SCSI host adapter, make sure that it supports asynchronous I/O; most host adapters don't support this feature, nor do any IDE drives.

    The cost of high-performance fixed-disk drives has declined rapidly in 1996 and is expected to drop further in 1997 as larger drives that use magneto-resistive heads and embedded servo positioning tracks become common. PCI bus-mastering host controllers range in street price from about $350 to $500, and low-cost hardware RAID controllers should hit the market by the end of 1996.

    If you plan to change SCSI host adapters, make a full, known-good backup (or two) before doing so. Low-level and high-level drive formats aren't identical for all SCSI host adapters. Changing from one SCSI adapter to another may require you to reformat all your disk drives.

    Software Solutions for Reducing Disk Bottlenecks.

    If your Windows NT 4.0 server is used as a print server in addition to a file server, an option is to increase priority of the thread that handles file services and reduce the priority of the thread that handles print services. Boosting the priority of the file-server thread causes file requests to be handled more quickly, at the expense of print services.

    By default, the print-server thread is set to 2 and the file-server thread is 1. The larger the number, the higher the priority assigned to the thread. To change the priority of the file-server thread with Registry Editor, follow these steps:

  • From the Start menu, choose Run to open the Run dialog.
  • In the text box, type regedt32 and click OK to launch Registry Editor (see fig. 14.14).

  • 14.14

    Using the Registry Editor to change Windows NT system values.

  • Select the HKEY_LOCAL_MACHINE view.
  • Expand the SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters key.
  • Select the ThreadPriority entry.
  • Not all systems have a ThreadPriority entry. If your system doesn't have this entry, it can be added through the Edit menu. Set the initial value to 2.

  • Change the value from 1 to 2 to increase the file server thread priority.
  • Server threads run at foreground process priority by default. Other threads in the system service (such as the XACTSRV thread, which is used for processing print requests) run at foreground process priority, plus 1. Thus, a file server that's also a print server may suffer from server thread starvation because the server threads are running at a lower priority than the print threads. Increasing the ThreadPriority value to 2 places a server thread in the same priority class as a print thread. The maximum value for ThreadPriority is 31. Don't increase the ThreadPriority value above 2; a value greater than 2 can cause other undesired system side effects.

  • Close the Registry Editor.
  • If your network consists of multiple Windows NT servers, you can use a technique called load balancing, which distributes the workload across multiple servers. Load balancing lets all the servers operate at a similar capacity, rather than heavily tax certain servers and underutilize other servers.

    To load balance a system, each server must be evaluated to determine where the most activity occurs. Once this is established, the most heavily used files and folders can be replicated across other servers to balance the network load. Replicating is a method of duplicating the content of folders, files, or even entire disks onto another disk drive on another machine. Although this technique is primarily used for providing an online path to information in case of a system crash of a primary server, it can be used for load balancing also. Users that need to view information can be sent to the replicated data, thus reducing the traffic to the primary server.

    See "Replicating Folders," (Ch 13)

    Eliminating Unneeded Network Protocols

    One advantage of the Windows NT operating system is its support for all commonly used network protocols. Although multiprotocol capability is a major selling point, a server doesn't benefit by having all available protocols loaded if some protocols aren't used or aren't necessary.

    When a network runs multiple protocols, the performance of the network suffers. For example, if your network includes NetWare file servers, you're running the NWLink protocol with IPX/SPX support. It may not be necessary to run the NetBEUI or TCP/IP protocols in this instance. Alternatively, if your network must run TCP/IP, you should consider changing the NetWare servers to use TCP/IP.

    The number of bindings that a network contains also affects network performance. By changing the binding order, you can obtain significant gains in network performance. For example, NetBIOS is the binding interface for the NT file server. The problem is that NetBIOS has binding interfaces to three protocols-NetBEUI, TCP/IP, and NWLink-presenting the server software with multiple choices when trying to satisfy a network request.

    Changing the Binding Order of Multiple Protocols

    If you can't reduce the number of network protocols in use, you can alter the order of binding to satisfy the most network requests on the first attempt. To view and alter the order of network bindings, follow these steps:

  • From the Start menu, choose Settings and then Control Panel.
  • Double-click Control Panel's Network tool to open the Network property sheet.
  • Click the Bindings tab to display the Bindings properties page. Select the All Protocols entry from the combo box, if it's not already selected.
  • In the list box, you can change the order of the protocol bindings for each service. Double-click the entry for the service for which you want to change the binding priority to display the underlying bindings for the service (see fig. 14.15).

  • 14.15

    Using the Bindings page of the Network properties sheet to rearrange network protocol bindings.

  • If most users use TCP/IP, for example, select this binding and click the Move Up button until TCP/IP is at the top of the list. (The Move Up and Move Down buttons are disabled until you select a protocol for a particular service.)
  • Click OK to accept the changes or Cancel to abort the changes.
  • If you click OK and have made changes, Windows NT re-creates the bindings and asks that you shut down and restart the server. On restart, the new binding priorities are effective.
  • Overcoming Network Media Limitations

    You also can use Performance Monitor to view network characteristics that affect file server performance. Select the Server object and view the Bytes Total/sec counter (see fig. 14.16); compare this number to the rated media speed of your network, such as 4mbps or 16mbps Token Ring or 10mbps Ethernet. If the number of Bytes Total/sec is near the media speed of your network, your network is overworked. In this case, you must separate the network into multiple segments to ease the burden. Fortunately, Windows NT Server 4.0 lets you install multiple network cards for segmenting.


    14.16

    Monitoring the network performance of a Windows NT server.

    Some additional tips for fine-tuning the network performance of your Windows NT Server are as follows:

  • If your server uses WINS (Windows Internet Name Service) and TCP/IP, you can reduce the number of system broadcasts by binding the NetBIOS interface to TCP/IP.
  • If your network contains Windows for Workgroups (WfWg) clients and you use TCP/IP, be sure to update the WfWg clients with the version of Windows for Workgroups included on the Windows NT Server 4.0 CD-ROM. The new WfWg TCP/IP driver increases the server's performance.
  • Reducing File Fragmentation

    It's a common misconception that Windows NT Server's NTFS eliminates problems with file fragmentation. Fragmentation-defined as files stored in multiple, non-contiguous clusters-slows file read and write operations, especially with large files.

    Although Windows 95 includes a built-in defragmentation utility, Disk Defragmenter, Windows NT 4.0 doesn't provide such an application. Commercial products are available to help correct and reduce the amount of disk fragmentation for your Windows NT systems. Symantec's Norton Utilities for Windows NT contains a utility similar to the Windows 95 Disk Defragmenter.

    One unique product available is Diskeeper for Windows NT from Executive Software (http://www.execsoft.com). Diskeeper is a Windows NT service that runs constantly in the background and controls disk fragmentation as it occurs. By having Diskeeper work in real time, you never have to take the server offline to perform defragmentation, and your drive is optimized for the fastest disk access possible.

    When purchasing any third-party accessory software for Windows NT 4.0, make sure that the supplier warrants that the product is designed for Windows NT 4.0. Changes between versions 3.x and 4.0 of Windows NT affect many applications that use Windows NT's lower-level services.

    Optimizing Windows NT 4.0 as an Application Server

    Windows NT gained its initial reputation as a high-performance application server, primarily running client/server relational database management systems (RDBMSs), such as Microsoft SQL Server. The Microsoft BackOffice server suite adds Exchange Server, System Management Server (SMS), and SNA (Systems Network Architecture) Server as server-based applications. Other firms, such as Oracle and IBM, offer server-based RDBMSs and messaging systems that run under Windows NT Server 4.0.

    Running on the same system, several client/server applications that service large numbers of users can tax the capabilities of even the highest-performance computer platforms. When dealing with application servers, the most obvious place to look for bottlenecks is the CPU and memory systems.

    Examining an Application Server's CPU Usage

    Performance Monitor is a valuable tool for detecting overuse of a server's CPU(s). Select the Processor object and watch the % Processor Time counter during periods of the heaviest network traffic. By examining the % Processor Time counter, you can determine CPU loading and how often your CPU is being "maxed out." When % Processor Time reaches 85 percent or more on a regular basis, you should consider upgrading your processor to a higher speed (if supported by your server's motherboard) or add an additional processor (if you have a multiprocessing system). If your server does double duty-acting as a file server and an application server-consider adding a new server to take over application services.

    Multithreaded server applications take much better advantage of multiprocessor systems than file servers. If you intend to add an application server, invest in a system that can support up to four CPUs, even if you install only one processor initially. An application server should be equipped with a minimum of 64M of RAM. Use the largest single-inline memory modules (SIMMs) or dual-inline memory module (DIMMs) that the motherboard supports to maximize the amount of RAM that you can install in the future. Depending on the usage of your server-based applications, adding RAM may be more cost-effective than increasing the number of CPUs. Memory usage is the subject of the next section, "Examining Memory Usage in an Application Server."

    Another area of concern is the number of Interrupts/Sec with which the processor must contend. The number of interrupts per second is not a CPU problem, but the values of the Interrupts/Sec and % Interrupt Time counters can point out potential server hardware problems. A typical Windows NT server handles about 100 to 150 interrupts per second on the average. If the Interrupts/Sec counter displays 600 or more interrupts per second, the problem is likely to be a faulty or failing hardware component (often an adapter card).

    You can detect poorly written device drivers by viewing the value of the System object's Context Switches/Sec counter. If the rate of context switching is more than 500 per second, it's possible that a device driver has built-in critical sections that take too long to process. (A critical section is a Win32 synchronization object that ensures that only one thread can execute a particular block of code at a time.)

    A less obvious problem is screen savers running on the server. A screen saver is a relatively small task that runs after a period of inactivity, but some screen savers can be CPU killers. Examples of killer screen-savers are the Bezier Curves and 3-D Pipes screen savers that are part of Windows NT. (The CPU burden is caused by the 3-D graphics used by these screen savers.) Windows NT 4.0 has a simple built-in screen saver that's operational before an operator logs on at the server console. You remotely monitor most servers, which usually are in a relatively inaccessible location, so turning the monitor off when not in use is the most effective screen saver.

    Examining Memory Usage in an Application Server

    One of the most effective methods for achieving better system performance is through the addition of more physical (DRAM or dynamic RAM) memory. Within reasonable limits, the performance of Windows NT Server 4.0's operating system and the server-based applications improves with the addition of more memory. Just adding more RAM, however, isn't the entire solution to optimizing application server performance; you must correctly use the available memory.

    See "The Windows NT Executive," (Ch. 3)

    Experience shows that no matter how much memory exists in a Windows NT Server system, the operating system and server-based applications always find ways to use additional RAM. Windows NT Server uses most memory as a disk cache.

    You use the Memory object's counters in Performance Monitor to check memory usage. The number of Committed Bytes should be less than half of the physical memory available, leaving the other half or more of RAM for disk caching. The number of Available Bytes should be at least 1M-preferably much more. If Performance Monitor displays less than the preceding values, you need more RAM.

    Examining Virtual Memory.

    Virtual memory supplements RAM with disk files that emulate RAM, a process called swapping or paging. Virtual memory is defined as the amount of physical memory (RAM) available in the system plus a pre-allocated amount of memory on the system's fixed disk. Windows NT allocates the disk-based component of virtual memory in Pagefile.sys, which by default resides in the root folder of the disk drive on which you install Windows NT.

    Pagefile.sys is unique because Windows NT creates the file as a series of contiguous clusters during installation. This structure lets the operating system issue a special set of disk I/O calls to read and write from Pagefile.sys, rather than use the conventional file system for disk I/O. The disk I/O calls to Pagefile.sys are much faster than Windows NT's normal disk operations but are much slower than memory I/O operations. To achieve maximum system performance, your objective is to minimize paging.

    The amount of paging performed is directly related to the how virtual memory is used. Windows NT reserves about 4M of RAM for its own use and allocates up to half of the remaining RAM as a disk cache, so running large server applications is likely to involve paging operations. Check the Memory object's Pages/sec counter during periods of maximum activity of your server-based applications, such as SQL Server and Exchange Server. The Pages/sec counter's value should be 5 or less. If the number of Pages/sec is greater than 5, the server is performing too many paging operations, and you need to increase the amount of server RAM.

    Virtual memory operations become very slow if the amount of virtual memory needed by Windows NT and running applications exceeds the amount of space allocated to Pagefile.sys. When this situation occurs, Windows NT dynamically expands the size of Pagefile.sys. The expansion process is slowed as Windows NT searches the disk for free disk space. Additional disk space is not in the contiguous-sector block of the original Pagefile.sys, a condition that slows read and write operations.

    Maximizing Network Throughput.

    For application servers, network throughput is extremely important. The following steps help to maximize network throughput:

  • From the Start menu, choose Settings and Control Panel.
  • Double-click Control Panel's Network tool to open the Network property sheet.
  • Click the Services tab to make the Service properties page active, and select Server from the Network Services list (see fig. 14.17).
  • Click the Properties button to open the Server Configuration dialog (see fig. 14.18).

  • 14.17

    Configuring the server network software for better system performance.


    14.18

    Maximizing network throughput for Windows NT Server applications.

  • Select the Maximize Throughput for Network Application option.
  • If you don't have LAN Manager 2.x clients on the network, clear the Make Browser Broadcasts to LAN Manager 2.x Clients check box.
  • Click OK to accept the changes, or click Cancel if you haven't made changes. If you have made changes, you must shut down and restart Windows NT to make the change effective.
  • You can control the amount of virtual memory allocated to Pagefile.sys by following these steps:

  • From the Start menu, choose Settings and then Control Panel.
  • Double-click Control Panel's System tool to open the System Properties sheet.
  • Click the Performance tab to make the Performance properties page active, and click the Virtual Memory button to open the Virtual Memory dialog (see fig. 14.19).
  • To change the amount of disk space consumed by Pagefile.sys, alter the settings in the dialog.
  • Click OK if you've made changes or Cancel if you haven't made changes. You must shut down and restart the server if you make changes to Pagefile.sys.

  • 14.19

    Altering the amount disk space used for virtual memory with Control Panel's System tool.

    When Windows NT allocates memory for Pagefile.sys, it tries to allocate contiguous space on the hard disk equal to the size specified for virtual memory. If contiguous space equal to the specified size is not available, the largest amount of contiguous space available is allocated and the remaining amount is allocated from the closest available clusters on the disk. When contiguous space is allocated, Windows NT is much faster at swapping memory to and from disk. Whenever increasing the size of your virtual memory, it would be beneficial to defragment your hard disk in order to maximize the possibility of allocating contiguous disk space for Pagefile.sys.

    Viewing Virtual Memory with Performance Monitor.

    The Commit Limit counter of Performance Monitor's Memory object shows the amount of memory in Pagefile.sys plus the amount of RAM that can be swapped to disk. In a system with 32M of RAM and a 57M Pagefile.sys file, the Commit Limit is 82.5M. When the number of Committed Bytes exceeds the Commit Limit, Windows NT attempts to expand Pagefile.sys. To view the amount of memory that can't be paged from RAM, view the Pool Non-Paged Bytes counter.

    There are four recommendations to reduce the amount of page swapping:

  • Add more RAM to the system.
  • Remove unneeded services to lower operating system memory consumption.
  • Remove unneeded device drivers.
  • Install a faster fixed disk to reduce paging response time.
  • Two Windows NT Server 4.0 services consume large amounts of memory: DHCP (Dynamic Host Configuration Protocol) and WINS (Windows Internet Name Service). If you need these services, you might find it a wiser choice to place DHCP and WINS on another server, such as a file server, rather than on the application server.

    From Here...

    This chapter demonstrates that Performance Monitor is an extremely valuable tool for tracking network and server performance characteristics. By analyzing the data obtained from the Performance Monitor combined with the knowledge of how the servers in your network are being used, all the tools are available to achieve optimum network performance.

    The following chapters provide additional information useful when optimizing Windows NT Server 4.0's performance:

  • Chapter 3, "Understanding the Windows NT Operating System," briefly describes the Virtual Memory Manager that is responsible for allocating memory resources.
  • Chapter 4, "Choosing Network Protocols," shows you how to add and delete the network protocols supported by Windows NT 4.0.
  • Chapter 5, "Purchasing Networking Hardware," includes advice on determining server hardware and RAM requirements.

  • Previous chapterNext chapterContents