PerfWizard is a diagnostic tool that helps customers and engineers resolve performance-related issues in their SharePoint deployments. PerfWizard helps you create and deploy Performance Monitor (PerfMon) counters through automation on specified servers in the farm that are running SharePoint and Microsoft SQL Server. You can run PerfWizard on one computer in the SharePoint farm to create a series of .cmd files. These .cmd files let you create, delete, start, stop, and query the PerfMon counters. They are highlighted in the File List section. The .cmd files perform all these operations remotely on each server that you specify when you run PerfWizard. Without PerfWizard, it can take hours to set up PerfMon counters on multiple servers in a farm. By using PerfWizard, that job should take only a few minutes to finish.
PerfWizard is a tool that was developed by and is primarily used by Microsoft Technical Support Engineers. To use PerfWizard, you must open a support case with Microsoft. You can contact Microsoft Support to open a support case. Your Support agent can then send you a link to download PerfWizard.
The nature of the performance issue that you are experiencing will likely determine how you run PerfWizard and the data collector scripts. Does the issue occur intermittently or constantly? Does it affect only certain servers? Which services are deployed to the servers? Does the issue occur only at certain times of day? These are the kinds of questions that you must ask before you collect performance data. Troubleshooting performance can be a long and difficult process, so proper planning saves time.
When you run PerfWizard, you enter the server names for each server that is running SQL Server, each Web Front End server, and each search server on which you want to create performance counters. You can refer to the PerfWizard Versions and Counters section to see which counters are deployed to each kind of server. PerfWizard allows a server to have one set of counters So you cannot add the same server both to the Web Front End to SQL Server. Specify only the servers on which you want to create the counters. This might be a specific server or every computer in the farm.
Follow these guidelines when you collect PerfMon data:
Follow the instructions below to run PerfWizard.
1.) On the Start menu on one of the servers in the farm, right-click Internet Explorer, and then click Run as Administrator.
2.) Open the URL that was sent to you by your Support agent. The following screen is displayed:
3.) Click Run. The following screen is displayed:
Note: We highly recommend that you run the network connectivity tests that are offered here before you accept the license agreement. Many servers have restricted network access. Therefore, the diagnostic package may fail in the next step as it downloads components that it requires to run. After you agree to the license agreement, and you verify that you have network connectivity to the download servers, click Accept.
4.) When you see the following screen, select This Computer, and then click Next:
5.) Now you can run PerfWizard. You are presented a series of dialog boxes that ask you to input the names of your servers by role. Remember that you can refer to the PerfWizard Versions and Counters section to see which counters are deployed to each kind of server. PerfWizard allows only one set of counters to be created on each server, so you cannot add the same server both to the Web Front End and to SQL Server. Specify only the servers on which you want to create the counters. These can be a specific server or every computer in the farm, as shown in the following screen shot:
6.) When you click Start, you are provided some instructions. Click Next to start to add the configuration settings within PerfWizard. You are prompted for your support case number and the path of the output log folders. We highly recommend that you store the logs from all servers on a network share to aid the collection process. We also recommend that you store the logs on a nonsystem drive. The following screen shots provide samples of what your input should resemble:
A folder named PerfWizard is created and saved to the desktop. This folder contains all the .cmd files that are described in the File List section. Go to the Using the .cmd Files section for detailed information about what each of these files does.
You now have the option to save the results or upload them to the Microsoft website for your Support agent to view. This package collects no data from your system. It only creates the .cmd files to automate the configuring of PerfMon counters. Your Support agent is notified when you upload the results. But the real power of this package comes from the .cmd files themselves.
1.) Follow steps 1 through 4 from the With Internet Access section,. except that in step 4, select A different computer. Leave the check box cleared if you want the diagnostic package to install Windows PowerShell for you, as shown in the following screen shot:
2.) Specify a file location in which to save a portable version of PerfWizard. The program is saved as PortableDiagnostic.exe.
3.) Move PortableDiagnostic.exe to one of the servers on which you want to run PerfWizard. Right-click the file, and then click Run as Administrator. You can now follow the rest of the With Internet Access procedure, starting at step 5.
Read the File List section to understand each .cmd files that are created.
1.) We recommend that you enable the ProcessNameFormat and ThreadNameFormat registry values before you create PerfMon counters. This makes it much easier to correlate data to specific processes and threads based on their IDs. By default, PerfMon appends a number to each process that has the same name. For example, PerfMon typically creates W3WP_1, W3WP_2, W3WP_3, and so on. When these naming options are enabled, the Process IDs for each process is appended instead. For example, PerfMon creates W3WP_2740, W3WP_4668, W3WP_5672, and so on.
2.) Create the counters. Run the CreateCounters.cmd file to create baseline and incident counters on all the computers on which you are running PerfWizard. For every server that you specified in the server list, you should see a “The command completed successfully” message. If you do not see this message, verify that you have local administrator credentials on each server. LOGMAN requires dynamic RPC ports to be open on the remote server. You might receive “access denied” error messages for this reason in secure environments. In this case, and instead of changing firewall settings, we recommend that you run the .cmd files on each server in the farm to create the counters.
3.) You can verify that the counters were created by checking directly in PerfMon or by using the “QueryCounters.cmd” script.
4.) After you create the counters on all the appropriate servers, you’re ready to start the baseline counters. These should run continuously so that you have data to compare to for all hours of the week. When you’re ready to start all the counters, run the StartBaselineCounters.cmd file. Again, you can verify that the counters started by checking PerfMon or by running the query file. We recommend that you upload baseline data to your Support agent daily for analysis.
5.) Wait for the issue to occur. When you see the issue, repeat step 3 for the incident counters. Make sure that you stop these counters as soon as the issue stops. These counters have a much higher sample rate, so they’ll occupy more disk space.
6.) Now that you have baseline data and also data that was collected when the issue was occurring, you can upload the PerfMon logs to your Support agent, who will provide you a link to a secure file transfer. Obtain the PerfMon log files from the location in which you saved them when you ran PerfWizard. Your file list should resemble the following:
Several .cmd files are created when you run PerfWizard. Each .cmd file contains batch code that performs a PerfMon operation, such as “start” and “stop.” You can open the .cmd files by using a text editor, such as Notepad, to view the script that will be run. The following table displays the name and descriptions of each file that is generated. Each file is appended by using the Case ID that was entered when you ran PerfWizard. If no value was entered, a random number is used instead.
Creates both baseline and incident Data Collector Sets in PerfMon. After they are created, you can view the Data Collector Sets by opening PerfMon and expanding User Defined Data Collector Sets.
Sets the ProcessNameFormat registry value. This lets Process IDs to be displayed in PerfMon data. For more information, see this article.
Sets the ThreadNameFormat registry value. This lets Thread IDs to be displayed in PerfMon data. For more information see this article.
Removes the ProcessNameFormat registry value.
Removes the ThreadNameFormat registry value.
Starts all baseline data collectors on all servers that are specified when you run PerfWizard. The baseline counters should run continuously so that there is data against which any changes can be evaluated.
Starts all incident data collectors on all servers that are specified when you run PerfWizard. The incident counters have a very small sample interval. This means that they record performance data much more frequently than baseline counters. These should run only when the performance issue is occurring, and the performance log file should be monitored to make sure that it does not consume too much disk space.
Stops all baseline data collectors on all servers that are specified when you run PerfWizard.
Stops all incident data collectors on all servers that are specified when you run PerfWizard.
Queries the baseline counters on all servers in the farm. Querying the counters provides the following information:
- Counter Name
- Status (Running/Stopped)
- Log location
- Interval duration
- List of all counters
Queries the incident counters on all servers in the farm.
Deletes all baseline data collectors on all servers that are specified when you run PerfWizard.
Deletes all incident data collectors on all servers that are specified when you run PerfWizard.
· Learn about Using Performance Monitor.
· Learn about Working with Performance Logs.
· Check out Mike McIntyre’s blog about troubleshooting performance issues in SharePoint environments.
· Learn about Manipulating Performance Monitor logs.
· Check out these Microsoft Knowledge Base articles about PerfWizard Diagnostic for more information about these tools.
This version of PerfWizard is designed for Microsoft Support Engineers and IT Pros who specialize in Microsoft SharePoint Server. PerfWizard can be used to help identity performance issues and bottlenecks in a SharePoint farm. In order to use PerfWizard, you must be a local administrator on each server on which you want to collect performance data.
PerfMon Data Collector Sets write performance data to disk. We highly recommend that you store the PerfMon logs on a nonsystem drive. This option is presented when you run PerfWizard. Microsoft does not support the practice of modifying the scripts that PerfWizard generates, unless you are directed to do this by Microsoft.