Thursday, July 12, 2012

Windows Performance Monitoring Counters


Windows Performance Monitoring Counters:

 Steps To Set Performance Monitoring Counters in Windows Server Machine:

1. Go to Run in Start
2. Type Perfmon Press Enter
3.Right Click on Right Pane and Press Add Counters
4. Add the counters to be monitored at run time


Note:You can also collect the values of counters by setting New Collector for post analysis and report preparation

Resources
Performance
Monitoring Counters
Description
Processor
% Processor Time
% Processor Time is the percentage of elapsed time that the processor spends to execute a non-Idle thread.
% Previledge Time
% Privileged Time is the percentage of elapsed time that the process threads spent executing code in privileged mode.
% User Time
% User Time is the percentage of elapsed time the processor spends in the user mode.
Interepts/Sec
Interrupts/sec is the average rate, in incidents per second, at which the processor received and serviced hardware interrupts
Process
% Privileged Time
% Privileged Time is the percentage of elapsed time that the process threads spent executing code in privileged mode
% Processor Time
% Processor Time is the percentage of elapsed time that all of process threads used the processor to execution instructions.
% User time
% User Time is the percentage of elapsed time that the process threads spent executing code in user mode.
Page Faults/sec
Page Faults/sec is the rate at which page faults by the threads executing in this process are occurring.
Page File Bytes
Page File Bytes is the current amount of virtual memory, in bytes, that this process has reserved for use in the paging file(s).
Thread Count
The number of threads currently active in this process.
Working Set
Working Set is the current size, in bytes, of the Working Set of this process.
Working Set Peak
Working Set Peak is the maximum size, in bytes, of the Working Set of this process at any point in time.
Memory
Available Mbytes
Available MBytes is the amount of physical memory, in Megabytes, immediately available for allocation to a process or for system use.
Catche Faults/sec
Cache Faults/sec is the rate at which faults occur when a page sought in the file system cache is not found and must be retrieved from elsewhere in memory (a soft fault) or from disk (a hard fault).
Page Faults/sec
Page Faults/sec is the average number of pages faulted per second.
Page write/sec
Page Writes/sec is the rate at which pages are written to disk to free up space in physical memory.
Page read/sec
Page Reads/sec is the rate at which the disk was read to resolve hard page faults.
Pages/sec
Pages/sec is the rate at which pages are read from or written to disk to resolve hard page faults.
Pool NonPaged Bytes
Pool Nonpaged Bytes is the size, in bytes, of the nonpaged pool, an area of system memory (physical memory used by the operating system) for objects that cannot be written to disk, but must remain in physical memory as long as they are allocated.
Network Interface
Bytes Received/sec
Bytes Received/sec is the rate at which bytes are received over each network adapter, including framing characters.
Bytes Sent/sec
ytes Sent/sec is the rate at which bytes are sent over each network adapter, including framing characters. Network Interface\Bytes Sent/sec is a subset of Network Interface\Bytes Total/sec.
Bytes Total/sec
Bytes Total/sec is the rate at which bytes are sent and received over each network adapter, including framing characters.
Packets/sec
Packets/sec is the rate at which packets are sent and received on the network interface.
Packets Sent/sec
Packets Sent/sec is the rate at which packets are sent on the network interface.
Packets Received/sec
Packets Received/sec is the rate at which packets are received on the network interface.
Physical Disk
% Disk time
% Disk Time is the percentage of elapsed time that the selected disk drive was busy servicing read or write requests.
Avg Disk bytes/transfer
Avg. Disk Bytes/Transfer is the average number of bytes transferred to or from the disk during write or read operations.
Disk Read bytes/sec
Disk Read Bytes/sec is the rate at which bytes are transferred from the disk during read operations.
Disk write bytes/sec
Disk Write Bytes/sec is rate at which bytes are transferred to the disk during write operations.
Disk transfer/sec
Disk Transfers/sec is the rate of read and write operations on the disk.
Disk write/sec
Disk Writes/sec is the rate of write operations on the disk.
% Disk Read Time
% Disk Read Time is the percentage of elapsed time that the selected disk drive was busy servicing read requests.
% Disk Write Time
% Disk Write Time is the percentage of elapsed time that the selected disk drive was busy servicing write requests.
Avg Disk Queue Length
Avg. Disk Queue Length is the average number of both read and write requests that were queued for the selected disk during the sample interval.
Current Disk Queue Length
Current Disk Queue Length is the number of requests outstanding on the disk at the time the performance data is collected.
System
Context switches/sec
Context Switches/sec is the combined rate at which all processors on the computer are switched from one thread to another.
Processor Queue Length
Processor Queue Length is the number of threads in the processor queue.
Threads
Threads is the number of threads in the computer at the time of data collection.
Objects
Processes
Processes is the number of processes in the computer at the time of data collection.
Threads
Threads is the number of threads in the computer at the time of data collection.



Note: Counters shown above are the general one,More counters can be added depending on the type of application like [for .Net application;It is recommended to add counters related to the .Net application]

We will soon share the more counters depending on the type of applications.



Database Performance Monitoring Parameters: (Oracle 11 g)

Database Monitoring Parameters: (Oracle 11 g)


DataBase Monitorig(Oracle 11 g)
Resources
Performance
Monitoring Counters
Description
Wait Time Stats
DB CPU waits
Wait events are statistics that are incremented by a server process/thread to indicate that it had to wait for an event to complete before being able to continue processing.
Application waits
Network waits
Concurrency waits
Commit waits.
Cache Sizes.
Log Buffer
The Oracle log buffer is a small area of RAM where updates (DML) are processed for roll-forward and flashback functionality.
SGA Size
The System Global Area (SGA) is a group of shared memory areas that are dedicated to an Oracle “instance” (an instance is your database programs and RAM).
PGA Size
A PGA is a memory region that contains data and control information for a server process.
Capturing Resource intensive SQL statements
Queries with high execution time
Queries with high elapsed time per execution.
Queries with high CPU  time
Queries with high CPU time per execution.
Queries with high Read time
Queries with high Read time per execution.
Queries with high Write time
Queries with high Write time per execution.
Capturing Redundent Queries
Repeated queries for a single activity
Any repeated query for single activity.
Missing indexes/Full Table scan Monitoring
Missing indexes/Full Table scans
Execution plan to be generated or any index analyzer tool to be used for capturing missing indexes and to find table full scan.
AWR Report monitoring.
Automatic Workload Repository
The AWR collects and stores database statistics relating to problem detection and tuning.
ADDM Report Monitoring
Rowlock contention.
Queries to be identified causing any row lock contention on tables.
Queries with high parsing time
To verify any hard parsing in queries.
ASH Report monitoring
Active Session History
It contains the information about blocker and waiter identifiers and their associated transaction IDs and SQL.
Alert Log File Monitoring
Deadlock contention
Alert log file to traced for confirming any dead lock in application.
Network Log Monitoring
Network Usage
For Monitoring Network usage on database
Session monitoring
Session State,Current Query and Blocked Sessions
Monitoring of Blocked oracle sessions along with the waits stats.


Performance Monitoring Parameters/Tools for Java Application


Performance Monitoring Parameters/tools for java

Component
Description/Action
Tools/Utilities/
Parameters
/Files
Command Used
Heap Dump Analysis
Capturing Heap Dump
Jmap
javapath/jmap -dump:format=b,file= filename
Analyzing Heap Dump
Hpjmeter,Eclipse Memory Analyzer

Thread Dump Analysis
Capturing thread Dump
jstack
javapath/jstack > filepath
Analyzing Thread Dump
Samurai

GC Log Analysis and Monitoring
GC Log Analysis
Hpjmeter

Real Life GC Monitoring
jmap
java location\jmap -heap instantid
Real Life Monitoring                  
Logs Monitoring
[For Errors/Exceptions]
Catalina.out
tail -f apppath/logs/catalina.out
LocalHost Logs
tail -f apppath/logs/localhostfile
Access Logs
tail -f apppath/logs/accesslogfile
Server Logs
tail -f apppath/logs/serverlogfile
GC Logs
tail -f apppath/logs/gclogfile
Thread Monitoring
[To identify Blocked Threads]
java Melody

Heap usage Monitoring
java Melody

Tomcat Configurations
Configurations settings in Server.xml
maxThread

minSpareThreads

acceptCount

connectionTimeout

Hibernate Configurations
connection pool initialization configurations in Hibernate configuration file
initial_size

min_size

max_size

timeout

idle_test_period



Please fell free to add/update if we have missed anything...

Enjoy Performance Testing !!!!