CPU and Memory Statistics
Kosuri Suryanarayana Raju
Quality Specialist - Performance Engineer || Quality Assurance - Performance Testing || Application Performance Monitoring || Dynatrace Application Monitoring || Appdynamics Application Monitoring || AWR Reporting
In General it is very important to identify the process level and memory level issues for finding out the health of the application.
These metrics are very basic for understanding of application but gives the clear information for successful execution any performance scenario by keep tracking of metrics time to time during the test execution.
Baseline test: For any performance test scenario while executing test need to make sure that CPU utilization should be less than 80% and memory consumption should be less that 80% of total available memory. Then we can say that the test is valid and acceptable.
Below are some of the important metrics for understanding the performance of any application
Metrics: Metric is nothing but unit of measurement for any application interms of corresponding client side or server side interaction. Now we are looking for the server side some of the CPU and Memory Statistics as listed below.
Processor CPU metrics
1) % Processor time: It shows the percentage of CPU utilize to execute all threads running on a server.
By analyzing each individual process CPU usage, we need to identify which process CPU process consumes high CPU utilization. Whenever we identified one of the process consuming CPU usage is more than expected also which is not belongs to our application. So we need the kill or end up the process and re-run the performance test again.
2) % Idle time: It shows the percentage of the CPU that is free or idle on the server during the performance scenario execution.
At least 20% of CPU should be Idle or free on the server throughout the test execution.
We need to apply the CPU bottleneck analysis. Need to find out which thread is consuming higher CPU consumption in the application.
3) % user time: It shows percentage of CPU utilization to run all user level process
4) % Privileged time: It shows the percentage of CPU utilization to run all system level process
5) % Interrupt time: It shows the percentage of CPU interrupt by system clock, mouse, data communication lines, network interface cards, disk drivers and other peripheral devices.
6) % Deferred Procedure call per second: It shows the number of low priority interrupts added to the queue per second.
7) Context Switching: Whenever any process or thread creates in user mode but it may convert into system mode to gain more system resources access. Because in user mode is completely restricted access mode of system private data.
Memory Metrics
1) Available Megabytes : It shows the amount of RAM memory available on server during performance scenario execution. At least 20% of total RAM memory be available for free for better performance of application.
A performance object contains private bytes and virtual bytes.
Private bytes: It shows the amount of RAM memory allocated for each individual process.
Virtual bytes: It shows the amount of virtual memory allocated for each individual process.
2) Committed Bytes: Committed Bytes is the amount of memory committed to virtual memory.
Committed memory is the physical memory which has space reserved on the disk paging file.
3) Page faults per second: whenever the required memory pages are not found in paged memory is called paged fault.
So to resolve page fault it can read required memory pages a (RAM) memory or read the required pages from virtual memory (hard disk).
Page faults/sec=hard faults/sec and soft faults/sec.
Where Hard faults = page reads/sec and pages input/sec
Where pages faults and Hard fault per second difference gives soft faults/sec.
4) Page reads per second: It shows the no of page read operation performed from virtual memory.to resolve hard faults with regarding to a single page retrieved in each read operations.
5) Page writes per second: After resolved hard faults the corresponding used pages will be written back to virtual memory with regarding to a single page in each write operation.
6) Pages Input per second: It shows the no of page read operation performed from virtual memory to paged memory.to resolved hard faults with regarding to multiple pages retrieved in each read operations.
7) Pages output per second: After regarding hard faults the corresponding used pages written back to virtual memory with regarding to a multiple pages in each read operations.
8) Pool non paged bytes: It is an area of ram memory allocated to resolve soft faults in a ram memory and it does not include virtual memory.
9) Pool paged bytes: It shows the amount of paged memory paged memory in bytes which includes ram memory and virtual memory. So virtual memory pages will be written to disk after resolved hard faults.
Physical disk (or) hard disk
1) %Disk time: It shows the percentage of hard disk is busy to serve read or write request.
2) %Average disk read Queue length: It shows the number of requests that are queued at hard disk while doing read operation.
Average disk read queue length should not be more than two.
3) %Average disk write Queue length: It shows the number of requests that are queued at Hard disk while doing or performing write operation.
4) Current disk Queue length: It shows the number of outstanding request that are queued at hard disk either read request or write request.
Current disk queue length should not more than two.
Server Metrics
1) Bytes received per second: It shows how busy the server is to receive the request from the client.
2) Bytes transmitted per second: It shows how busy the server is to respond to the client.
System Metrics
1) Context Switches per second: It shows the number of requests that are switched from user mode to system mode to gain more system resource access per second.
2) Processor Queue length: It shows the number of threads (or) requests that are queued at all the processors of system.
3) Process: process is a executable program which run through execution file (.exe)
4) Threads: Thread is an entity (or) piece of program to execute without creating execution file (.exe)
For better performance of a server system process count should be less and thread count should be more. Because thread is sharable memory.
Senior Manager at Marsh McLennan
8 年Awesome Info... Surya