Part 1
You've just purchased a new server, installed the operating system and the applications, and
connected the system to the network. At first, everything works well. But as the user load
increases, the system slows to a crawl. So you launch that Windows NT Server application that
automatically tunes every aspect of your system, and users are happy again.
Wake up from your dream. NT Server doesn't work quite like that. As with other operating
systems, you need to tune NT Server to use the server's limited resources efficiently so you can
ultimately provide good service for the end users. Although you can't solve all your tuning
nightmares with one stroke, you can get ahead in the tuning game with some good planning, a basic
tuning methodology, configuration testing, and proactive NT Server monitoring.
Tuning Strategy
To get the most out of NT Server, you need to plan your system layout before you initially load
the operating system, and you have to thoroughly understand your server hardware. Then before you
unleash your server on the user community, you need to test the configuration to be sure that your
server is working as you've planned.
To optimize performance, use the tools provided by NT Server and third-party vendors to monitor
your system and identify potential bottlenecks. If you find a bottleneck, try to determine its
cause; sometimes the cause is elusive. Try one change at a time to fix the problem. If you make
several changes, you will have trouble determining what works and what doesn't. If you make multiple
changes, be sure to compare the results with your baseline to find out whether the changes were
helpful. Always test your new configuration, then test it again. You need to ensure that the changes
you've made have not adversely affected your server.
The first step in optimizing performance is tuning your hardware. Then look at how your
operating environment and applications are using memory, establish baselines to identify problem
areas, and systematically document the effects of modifications you make. This article will give you
a good idea where to start. Next month, I'll talk about tuning disk and network I/O and CPU.
Tuning the Hardware
A good administrator has to understand both hardware and software. Before you load NT Server,
think about which applications it is running, the hardware NT Server is running on, and the goals
you want NT Server to accomplish today and tomorrow.
When you're starting at ground level with your hardware, be sure that you have set the server's
BIOS settings for maximum performance and stability. Have you turned on write-back cache and zero
wait states for memory and set the CPU speed to fast? (OK, fast CPU speed is obvious, but I have
seen what happens when a CPU is set to a lower setting.) Ask your hardware's manufacturer for the
most recent BIOS release level and optimum BIOS settings for the system's architecture. Most
hardware manufacturers have this information on their Web site. Microsoft keeps similar information
on its Web site about NT Server patches or service packs. These patches attempt to fix known
problems and occasionally include performance enhancements.
Getting to Know Your System: Baselines
Before you can remove bottlenecks, you need to understand how NT Server controls and interacts
with your entire system. All the server's major resources-- CPU, memory, disk I/O, network I/O,
and applications--are interrelated, so solving one problem can sometimes cause another. Therefore,
you need to know what effects your solution will have. Two tools included with NT Server 4.0 for
monitoring your system's performance are Performance Monitor (Perfmon) and Task Manager. Although
the NT Workstation and Server resource kits offer other tools (e.g., pviewer.exe, pmon.exe, sc,
etc.), for monitoring specific processes, I'll discuss the functionality of only built-in tools.
Perfmon. You can use Perfmon in a variety of ways to observe NT Server's use of
resources. Collecting performance data over a significant period can help you develop a performance
baseline for detecting bottlenecks and for determining whether your tuning efforts are succeeding.
Typically, a sampling period of 10 minutes is sufficient. For finer grain transaction workloads, set
the sampling interval to between 5 seconds and 10 seconds, or for coarser grain workloads, set the
interval as high as 20 minutes.
To log performance data, start Perfmon from the Start, Programs, Administrative Tools menu. To
enter logging mode, select View, Log, Edit, Add to log. Select all objects, then click Add and then
Done. Screen 1 shows how to begin the logging session: Select Options, Log, enter the name of your
log file (e.g., test1-perfmon-log), specify a sampling interval, and then click Start Log.