Tuesday, February 17, 2015

Capacity Planning from response time using R

While going through session of Capacity planning using Statistical pattern - R
- Based on load testing report, we can identify resource utilization using R project
- We can give input of different response time to R and estimate required CPU core


Refrence:-
http://www.r-project.org/

mysql database profiling using JetProfiler

While working with mysql database found issue in mysql tuning, so used JetProfiler for mysql analysis
- Used to verify no.of  threads
- Also verified no. of connections to mysql
- Verified open tables by mysql
- Also Top queries which are taking most of execution time.

Friday, February 13, 2015

Profiling using JVisualVM


Got chance to do performance analysis for java application, For that used JVisualVM for application profiling, heap dump, thread dump analysis
Add following details in application's jvm config
-Dcom.sun.management.jmxremote.port=<jmx port>           
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=<tomcat server ip>         
Open /java/bin/jvisualVM on localhost
  - Add Remote host
  - Add JMX connection host:jmxport
once you above connection details, you will get panel for application with Overview,Monitor,Threads,Sampler tabs
1. In Monitor tab you can see CPU usage for that application, HEAP monitoring, loaded classes, total Threads 
 2. In Threads tab you monitor Live Threads, Finished threads.
3. One of the important tab is Sampler for profiling the application with respect to CPU, Memory
   - Once you click on CPU, JvisualVM started collection of method's self time and Self Time(CPU). You can also see Thread CPU time
   IMP:-
    Self Time: total time spent invoking this method. If a method was called twice, the self-time will be the sum of the time spent in each call excluding internal method calls.
    Self Time (CPU): the same as Self Time except that only CPU execution time is considered, omitting I/O operations.
    Total Time: total time spent invoking this method including internal method calls.
    Total Time (CPU): total CPU time spent invoking this method including internal method calls
   - Memory profiling :- Here you can see loaded classes and its instances with its size in bytes

In Profiling, From CPU  snapshot we can identify the methods which having high self time (cpu), no. of methods invocation and we can work on it as performance bottleneck.
We can do more performance analysis during heap dump, thread dump



Reference:--
https://blogs.oracle.com/nbprofiler/entry/profiling_with_visualvm_part_1

https://profiler.netbeans.org/docs/help/5.5/results_objliveness.html
https://profiler.netbeans.org/docs/help/5.5/snap_cpu.html
 

Sunday, February 8, 2015

UI Performance Analysis

Got Chance to do analysis for website performance issue.(response time was high for some of the post requests)

-   To get response time of each request ,we used Chrome browser and it's Developer tool feature.
-  For analysis we used Page Speed (which is external plugin for chrome browser). It gives recommendation to reduce response time ( e,g make post call parallel , minify java script, image compression, inline java script )

Also used WATIR (ruby) script for automation script to get response time for different builds