SOLUTION SNAPSHOT


PROBLEM
How to better manage server performance.
SOLUTION
Create a baseline of server performance by setting up SPA to collect data and generate reports, then have it notify you when performance levels begin to fall.
WHAT YOU NEED
The most recent version of Windows Server 2003 Performance Advisor (SPA); Windows Server 2003.
DIFFICULTY
1.5 out of 5

In “Diagnose AD Performance Problems” (December 2006, InstantDoc ID 93949), I set up a scenario to show how to use Windows Server 2003 Performance Advisor (SPA) in a diagnostic capacity. I created a domain controller (DC), loaded it heavily using ADTEST, and ran SPA to analyze the DC's performance. Although SPA diagnosed the problem, using SPA in this way makes for a reactive approach to performance management.

You can use SPA more proactively to collect and archive performance data regularly. Comparing a server's performance today with its performance a few months ago, you'll notice trends in performance, letting you take corrective action before problems affect your users. SPA provides two features that can help you collect, archive, and analyze performance data: scheduled data collection and centralized report generation. Let's look at how to set up SPA to collect data from multiple servers, generate the reports on a centralized reporting server, and notify you when performance levels drop.

Use SPA's Data and Report Roles


SPA relies on the Event Tracing for Windows (ETW) and performance counter subsystems for collecting performance data. These subsystems are quite efficient: Usually the only performance impact caused by running a collection is the cost of the I/O as SPA writes the raw data to hard disk, and you can easily avoid this performance hit by putting the raw data on a relatively unused disk.

However, analyzing the performance data and producing a report can be a very CPU-intensive task. In fact, if you check Performance Monitor while SPA is producing a report, you'll likely see that the CPU is pegged at 100 percent for a good portion of the process—clearly not an effect you want to deal with on a loaded production server.

You don't have to, however, because SPA divides the job of producing performance reports into two roles. The Data role collects raw performance data and stores it in files, and the Report role crunches the data, analyzes the results, and produces a formatted report. By default, the installer configures SPA to perform both roles on the same machine.

However, I recommend you configure SPA to perform only the Data role on your production servers and copy the raw data to a central reporting server where you've also installed SPA, and where it can perform the Report role. This approach gives you scheduled, low-impact data collection on your production servers and offloads the number crunching to a dedicated server.

Step 1: Configure the Central Reporting Server


To periodically generate SPA reports from multiple servers, first set up the central reporting server. This server can be a dedicated Windows server or one that's otherwise lightly loaded. Install SPA on the server, following the instructions in “Diagnose AD Performance Problems.” Then open SPA's Scope Tree view, right-click the Local Computer entry at the top, and select Properties from the context menu. Set the Role parameter to Report, and make sure that the AutoScan parameter is set to True, as Figure 1 shows.

Also note the path to the Transfer folder (C:\PerfLogs\Transfer in Figure 1), and create a share for that folder. The Data servers will copy raw performance data to this share, so set the access rights on the share to allow reading and writing by the Data servers.

Step 2: Configure the Data Collection Server(s)


After you set up the central reporting server, install SPA on the servers you want to collect data from. Open SPA's Scope Tree view on each server, right-click the Local Computer entry, and select Properties from the context menu. Set the Role parameter to Data, and set the path for the Transfer directory to the share you created on the central reporting server. SPA will collect the performance data locally and automatically copy the raw data files to the reporting server.

Step 3: Set Up a Schedule


For each data collector group you want to run on the Data server, create a schedule. Open the Properties page for the data collector group and click the Schedule tab. Click the Change button to edit the schedule, then the New button to add a new schedule entry, which Figure 2 shows. Edit the fields to create one or more schedule entries.

The data collector groups you configured will run automatically according to the schedules you defined. When they finish collecting data, they copy the raw data to the shared Transfer directory on the reporting server. The reporting server detects the new data files and automatically creates the appropriate reports.

Make sure that you enable the same data collector groups on the reporting server that you enabled on the data servers. If you don't, SPA on the reporting server won't detect the incoming files in the Transfer directory and won't create a report for that data collector group.

Step 4: Add Email Notification


Now you've set up SPA to automatically produce periodic performance reports for your DCs and other critical servers. But you still have to look at the reports occasionally to make sure your systems are running well. Reading the reports isn't difficult, but it's yet another task to add to your ever-growing task list. To save yourself some time and trouble, you can configure SPA to generate email notifications whenever it detects performance warnings during the report-generation process.

Run the SPA client on the reporting server. From the Edit menu, select Rules. Scroll down to the Global - Notification Control section near the bottom and check that Warning Notification is enabled and that the expression is set to >0 as Figure 3 shows. SPA evaluates the Warning Notification expression after generating a report, and if the expression evaluates to true, SPA will invoke the notification procedure defined for the Collector Group. I recommend that you initially set the expression to > 0 so that SPA will generate a notification whenever there is a warning condition. If you get too many notifications during normal operation, you should either fix the performance problem or adjust the thresholds for the performance conditions that generate the warnings, as I describe in the next section.

In the Scope Tree, open the Properties page for Local Computer and set the Mail From value to the name you want to appear in the From field of the notification email message. Set the SMTP Server entry to the host name or IP address of your mail server. Note that the account that SPA uses to generate the reports (by default, LocalSystem on the server SPA is running on) must have appropriate access to the specified SMTP server.

Finally, to generate notifications for each data collector group you want to track, open the Properties page and find the Messaging parameter in the Miscellaneous section of the dialog box. Figure 4 shows the box where you edit the messaging parameters. Click the Add button to add a new email notification entry, and enter your email address (or the email address of the person you want SPA to notify) in the Recipient field. Now, whenever SPA detects a warning condition in a performance report, it will send an email message with the appropriate information to the email address set in the Recipient field.