Monday, June 3, 2013

DATABASE(SQL) MONITORING IN LOAD RUNNER

Profiling

Profilers access the state of the application and can be notified of interesting events like object allocations and method invocations. Front-end that provides a GUI can be used, like commercial profilers OptimizeIt or JProbe, or the agent can simply dump the profiling information into a file like HPROF Profilers are very good at identifying hot spots that need to be optimized. Profilers help analyze CPU utilization, Memory usage, Thread behavior.
CPU Profiling
Its precise and accurate profiling of CPU consumption allows rapid identification and fixing of performance bottlenecks and inefficient algorithms.  Tools normally provide two CPU profilers to fit different profiling needs.

a)    Sample-based profiler: is a profiler that interrupts all running threads every p period. Once all threads are interrupted, it records what each thread is currently doing and whether each thread is currently using CPU. It then resumes all running threads. p is called a sampling period. This is the profiler of choice when profiling a large GUI application or a server running in production or in a test lab under load.  Sampling has little overhead but is very coarse-grained.

b)    Instrumentation-based profiler: is a profiler that intercepts method invocations. Each time a method is called the profiler records the fact that a method was called and gives the control back to the application. The profiler also intercepts when a method returns from executing and records the amount of time/CPU that was spent in the method. Very good precision: each time a method is invoked, it is recorded. Large overhead: the tested application runs several times slower with an instrumentation profiler.
In addition different profiler software provide varying feature to facilitate the use and analysis of the information gathered.
Monitoring of Object Allocations and Memory Leak Debugging
Spotting memory leaks has never been easy.  Available tools provide a comprehensive object reference graph that not only lists all references kept on each instance, but also automatically highlights references that need to be cleared so that an instance can be garbage collected.  Such advanced debugging capabilities help to dramatically shorten the time spent tracking memory leaks in any program.
Tools have a range of features specifically designed for the precise monitoring of object allocations.  Developers have the capability to monitor object allocations in real-time to detect performance issues such as excessive allocations.  Temporary objects can be closely analyzed with its functionality of garbage collection and temporal mark setting. 
Analyze Threads
Detect and predict thread deadlock, stalls, and data races before they cause business applications to crash. Thread issues have traditionally been difficult to apprehend because of the complexity of multi-threaded programs. Available tools lets developers easily understand thread issues -- such as thread contentions, thread starvation, excessive locking, and deadlocks. The tool gives developers a real-time, high-level view of the changing status of all threads in an application as it runs. Thread issues are spotted immediately, and can be tracked back to the responsible lines of code with a simple mouse click.
Tuning and Optimization
The biggest performance improvement in an application is typically achieved by eliminating badly performing designs and architectures.
After targeting design and architecture, the biggest bang for the buck in terms of improving performance is choosing a better performing software’s like better VM, and then choosing a better compiler.
Having tuned the design and architecture, and having selected improved VMs and compilers, the major bottlenecks remaining are probably due to the application implementation.


No comments: