Monthly Archives: May 2011

Using performance monitor

Performance Monitor
___________________

System Monitor and Performance Logs and Alerts :- Gives the details of the resources used by specific components of the operating system and programs.

Graphs display:- performance-monitoring data.
Logs :-recording the data.Alerts :- send notification to users through the Messenger service when a counter value reaches, rises above, or falls below a defined threshold.

Note:Task Manager is a tool that provides performance information on a desktop pc. It provides information about programs,processes and summary of processor and memory usage that are running on XP.

Starting Performance Monitor
Control panel > Administrative tools > Performance

or type perfmon from command

>runas /user:administrator perfmon
Enter the password for administrator:
Attempting to start perfmon as user “example\administrator” …

And for collecting data need to start(enable) Performance Logs and Alerts in services(type services.msc and start)
service location is C:\WINDOWS\system32\smlogsvc.exe

What components  can monitor
__________________________

(objects) are the components to monitor the activity
> Processors
> Memory
> Disks
> Network

(counters) are associated with performance object
> Processors\ % Processor Time
> Processors\ Processor Queue Length
> Memory\ Pages/sec
> Memory\ Page Reads/sec
> Physical Disk\ Avg. Disk Queue Length
> Network Interface\ Bytes total/sec
> Network Interface\ Packets/sec

Monitoring processor activity
_____________________________

Processor\% Processor Time
Processor\% User Time
Processor\% Privileged Time
Processor\% Processor Time

To determine whether a processor bottleneck exists due to high levels of demand for processor time, check the value of the System\Processor Queue Length counter. A queue of two or more items indicates a bottleneck. If more than a few program processes are contending for most of the processor’s time, installing a faster processor will improve throughput. An additional processor can help if you are running multithreaded processes, but be aware that scaling to additional processors may have limited benefits.

To determine whether interrupt activity is causing a bottleneck, watch the values of the Processor\Interrupts/sec counter, which measures the rate of service requests from input/output (I/O) devices. If this counter value increases dramatically without a corresponding increase in system activity, it can indicate a hardware problem.

If you want to assign a particular process or program to a single processor to improve its performance at the expense of other processes, in Task Manager, click Set Affinity. This option is available only on multiprocessor systems.

Controlling processor affinity can improve performance by reducing the number of processor cache flushes as threads move from one processor to another.

System\Processor Queue Length for bottleneck detection.

Monitoring memory activity
__________________________

Memory\Available Bytes
Memory\Pages/sec

Paging Files

Logical Disk\% Disk Time
Physical Disk\Avg. Disk Queue Length
Paging File\% Usage
Paging File\% Usage Peak (bytes)

How to estimate your memory requirements
____________________________________
Number of users multiplied by the average size of the open data files per user
Number of programs run on the server computer multiplied by the average size of programs run on the server

Pages/sec provides the number of pages that were either retrieved from disk due to hard page faults or written to disk to free space in the working set due to page faults.

Low values for Available Bytes (4 MB or less) might indicate there is an overall shortage of memory on your computer or that a program is not releasing memory. If the value of Pages/sec is 20 or more, you should research the paging activity further. A high rate for Pages/sec might not indicate a memory problem but might instead be the result of running a program that uses a memory-mapped file.

You must monitor Available Bytes along with Pages/sec and Paging File % Usage to determine whether this is the case. If you are reading a noncached memory-mapped file, you should also see normal or low cache activity.

How to manage paging file for better performance
________________________________________________
Place a paging file on multiple drives.splitting up the paging file will speed up the access time.
Increase the size of the paging file.recommended size for the paging file (Pagefile.sys)is equivalent to 1.5 times the amount of RAM available

Monitoring disk activity
________________________

Physical Disk\Disk Reads/sec and Disk Writes/sec
Physical Disk\Current Disk Queue Length
Physical Disk\% Disk Time
LogicalDisk\% Free Space
Physical Disk\Avg. Disk sec/Transfer
Physical Disk\Avg. Disk Bytes/Transfer
Physical Disk\ Disk Bytes/sec.

The Avg. Disk sec/Transfer counter reflects how much time a disk takes to fulfill requests. A high value might indicate that the disk controller is continually retrying the disk because of failures. These misses increase average disk transfer time. For most disks, high average disk transfer times correspond to values greater than 0.3 seconds.

You can also check the value of Avg. Disk Bytes/Transfer. A value greater than 20 KB indicates that the disk drive is generally performing well; low values result if an application is accessing a disk inefficiently. For example, applications that access a disk at random raise Avg. Disk sec/Transfer times because random transfers require increased seek time.

Disk Bytes/sec gives you the throughput rate of your disk system.

Monitoring network Activity
___________________________

Data-link :

Bytes total/sec
Bytes sent/sec
Bytes received/sec

Network layer:

Datagrams Forwarded/sec
Datagrams Received/sec
Datagrams/sec
Datagrams Sent/sec

Transport layer:

Segments Received/sec
Segments Retransmitted/sec
Segments/sec
Segments Sent/sec

Create and configure logs
_________________________

create a counter log
____________________
Double-click Performance Logs and Alerts, and then double-click Counter Logs.
Any existing logs will be listed in the details pane. A green icon indicates that a log is running; a red icon indicates that a log has been stopped.

Right-click a blank area of the details pane, and click New Log Settings.
In Name, type the name of the log, and then click OK.
On the General tab, click Add Objects and select the performance objects you want to add, or click Add Counters to select the individual counters you want to log.
If you want to change the default file and schedule information, make the changes on the Log Files tab and the Schedule tab.

To add objects to a log
_______________________
Double-click Performance Logs and Alerts, and then double-click Counter Logs or Alerts.
In the details pane, double-click the log or alert you want to modify.
On the General tab, click Add Objects. For each object that you want to add to the log or alert, perform the following steps:
To log objects from the computer on which the Performance Logs and Alerts service will run, click Use local computer counters.
Or, to log objects from a specific computer regardless of where the service is run, click Select counters from computer and specify the Universal Naming Convention (UNC) name, such as \\MyLogServer, of the computer you want to monitor.

In Performance object, click an object to monitor.
Click Add

To add counters to a log
________________________
Double-click Performance Logs and Alerts, and then click Counter Logs.
In the details pane, double-click the log you want to modify.
On the General tab, click Add Counters. For each counter or group of counters that you want to add to the log, perform the following steps:
To log counters from the computer on which the Performance Logs and Alerts service will run, click Use local computer counters.
Or, to log counters from a specific computer regardless of where the service is run, click Select counters from computer and specify the Universal Naming Convention (UNC) name, such as \\MyLogServer, of the computer you want to monitor.

In Performance object, select an object to monitor.
In Select counters from list, click one or more counters to monitor.
To monitor all instances of the selected counters, click All Instances. (Binary logs can include instances that are not available at log startup, but which subsequently become available.)
Or, to monitor particular instances of the selected counters, click Select Instances From List, and then click an instance or instances to monitor.

Click Add.

To create a trace log
_____________________
Double-click Performance Logs and Alerts, and then click Trace Logs.
Any existing logs will be listed in the details pane. A green icon indicates that the logs are running; a red icon indicates logs have been stopped.

Right-click a blank area of the details pane, and click New Log Settings.
In Name, type the name of the trace log you want to create, and then click OK.
By default, the log file is created in the PerfLogs folder in the root directory on your system drive, a sequence number is appended to the file name you entered, and the sequential trace file type with the .etl extension. Use the Log Files and Advanced tabs to modify these parameters or define other parameters for your log. To define providers and events to log, use the General tab. To specify when you want logging to occur, use the Schedule tab.

To create an alert
__________________
Double-click Performance Logs and Alerts, and then click Alerts.
Any existing alerts will be listed in the details pane. A green icon indicates that the alerts are running; a red icon indicates alerts have been stopped.

Right-click a blank area of the details pane, and then click New Alert Settings.
In Name, type the name of the alert, and then click OK.
To define a comment for your alert, along with counters, alert thresholds, and sample intervals, use the General tab.
To define actions that should occur when counter data triggers an alert, use the Action tab, and to define when the service should begin scanning for alerts, use the Schedule tab.

To define counters and thresholds for an alert
______________________________________________
Double-click Performance Logs and Alerts, and then click Alerts.
In the details pane, double-click the alert.
In Comment, type a comment to describe the alert as needed.
Click Add.
For each counter or group of counters that you want to add to the log, perform the following steps:
To monitor counters from the computer on which the Performance Logs and Alerts service will run, click Use local computer counters.
Or, to monitor counters from a specific computer regardless of where the service is run, click Select counters from computer and type the Universal Naming Convention (UNC) name, such as \\MyLogServer, of the computer you want to monitor in the text box.

In Performance object, click an object to monitor.
In Select counters from list, click one or more counters to monitor.
To monitor all instances of the selected counters, click All Instances. (Binary logs can include instances that are not available at log startup but subsequently become available.)
Or, to monitor particular instances of the selected counters, click Select Instances From List, and then click an instance or instances to monitor.

Click Add.
In Alert when the value is, specify Under or Over, and in Limit, specify the value that triggers the alert.
In Sample data every, specify the amount and the unit of measure for the update interval.
Complete the alert configuration using the Action and Schedule tabs.

To define actions for an alert
______________________________
Double-click Performance Logs and Alerts, and then click Alerts.
In the details pane, double-click the alert.
Click the Action tab.
To have the Performance Logs and Alerts service create an entry visible in Event Viewer, select Log an entry in the application event log. This option is selected by default.
To have the service trigger the messenger service to send a message, select Send a network message to, and then type the name of the computer on which the alert message should be displayed.
To run a counter log when an alert occurs, select Start performance data log and specify the counter log you want to run.
To have a program run when an alert occurs, select Run this program, and then type the file path and name or click Browse to locate the file. When an alert occurs, the service creates a process and runs the specified command file. The service also copies any command-line arguments you define to the command line that is used to run the file. Click Command Line Arguments and select the appropriate check boxes for arguments to include when the program is run.

To save graph data as an HTML page
__________________________________
Open Performance.
Add counters to a graph.
Right-click the displayed graph, and then click Save As.
In the Save As dialog box, select a path and type the name of the new HTML file.

To save data to a log file
__________________________
Open Performance.
Select a log file as the data source to display.
Right-click the System Monitor details pane and click Save Data As.
Type the name of the saved log file and select the format.
Enter the sampling rate (value n) for the saved log file in Reduce log file size by only writing one out of every n original log records.
By default, n is set to 1 and the saved log file contains the same number of data points as the original log file.
Click Save.

Advertisements
%d bloggers like this: