Keep an Eye on Server Performance

Microsoft's SPA utility helps you proactively manage your servers

Gil Kirkpatrick

December 25, 2006

6 Min Read
ITPro Today logo in a gray background | ITPro Today

SOLUTION SNAPSHOT


PROBLEM
How to better manageserver performance.
SOLUTION
Create a baseline ofserver performance bysetting up SPA to collectdata and generate reports,then have it notify youwhen performance levelsbegin to fall.
WHAT YOU NEED
The most recent version of Windows Server 2003 Performance Advisor (SPA); Windows Server2003.
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 diagnosticcapacity. I created a domain controller (DC), loadedit heavily using ADTEST, and ran SPA to analyze theDC's performance. Although SPA diagnosed theproblem, using SPA in this way makes for a reactiveapproach to performance management.

You can use SPA more proactively to collect andarchive performance data regularly. Comparing aserver's performance today with its performance afew months ago, you'll notice trends in performance,letting you take corrective action before problemsaffect your users. SPA provides two features that canhelp you collect, archive, and analyze performancedata: scheduled data collection and centralized reportgeneration. Let's look at how to set up SPA to collectdata from multiple servers, generate the reports ona centralized reporting server, and notify you whenperformance 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 ona 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 SPAis producing a report, you'll likely see that the CPU ispegged at 100 percent for a good portion of the process—clearly not an effect you want to deal with on aloaded 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 ADPerformance Problems.” Then open SPA's Scope Treeview, right-click the Local Computer entry at the top,and select Properties from the context menu. Set theRole parameter to Report, and make sure that theAutoScan parameter is set to True, as Figure 1 shows.

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

Step 2: Configure the Data Collection Server(s)


After you set up the central reporting server, installSPA 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 Propertiesfrom the context menu. Set the Role parameter to Data, and set the path for the Transfer directory tothe share you created on the central reporting server.SPA will collect the performance data locally andautomatically 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 theData server, create a schedule. Open the Propertiespage for the data collector group and click the Scheduletab. Click the Change button to edit the schedule, thenthe New button to add a new schedule entry, which Figure 2 shows. Edit the fields to create one or moreschedule entries.

The data collector groups you configured willrun automatically according to the schedules youdefined. When they finish collecting data, they copythe raw data to the shared Transfer directory on the reporting server. The reporting server detectsthe new data files and automatically creates theappropriate reports.

Make sure that you enable the same datacollector groups on the reporting server that youenabled on the data servers. If you don't, SPA onthe reporting server won't detect the incomingfiles 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 produceperiodic performance reports for your DCs andother critical servers. But you still have to look at the reports occasionally to make sure your systemsare running well. Reading the reports isn't difficult,but it's yet another task to add to your ever-growingtask list. To save yourself some time and trouble,you can configure SPA to generate email notifications whenever it detects performance warningsduring the report-generation process.

Run the SPA client on the reporting server.From the Edit menu, select Rules. Scroll downto the Global - Notification Control sectionnear the bottom and check that Warning Notification is enabled and that the expression isset to >0 as Figure 3 shows. SPA evaluates theWarning Notification expression after generating a report, and if the expression evaluates totrue, SPA will invoke the notification proceduredefined for the Collector Group. I recommendthat you initially set the expression to > 0 sothat SPA will generate a notification wheneverthere is a warning condition. If you get toomany notifications during normal operation,you should either fix the performance problemor adjust the thresholds for the performanceconditions that generate the warnings, as Idescribe in the next section.

In the Scope Tree, open the Properties pagefor Local Computer and set the Mail Fromvalue to the name you want to appear in theFrom field of the notification email message.Set the SMTP Server entry to the host nameor IP address of your mail server. Note that theaccount that SPA uses to generate the reports (by default, LocalSystem on theserver SPA is running on) musthave appropriate access to thespecified SMTP server.

Finally, to generate notifications for each data collector groupyou want to track, open the Properties page and find the Messagingparameter in the Miscellaneoussection of the dialog box. Figure 4 shows the box where you edit themessaging parameters. Click theAdd button to add a new email notification entry, and enter youremail address (or the email addressof the person you want SPA tonotify) in the Recipient field. Now,whenever SPA detects a warningcondition in a performance report,it will send an email message withthe appropriate information to theemail address set in the Recipientfield.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like