Monday, May 6, 2013

BOTTLE NECKS In The Applications


BOTTLE NECK : 1

Hits/sec:- I  design the scenario for 2000users in 2hrs test execution.

Issue: In 2hr the test execution I observe hits/sec is completely getting down to zero after 19min of test execution. But still the users are running constantly.

Observation:  I observe during the load test execution the web server was completely down at 19 min of the test execution and the application is not accessible by manual.

Recommendation: Recommend to the development team to do the tuning exercise to resolve in the web servers to get continues response for 2hr load test.

Resolution: the development team did some type of tuning to maintain the concurrence load for 2hrs test execution. The development team shares the resolution as shown below.
  
1. Apply the tuning exercise on web server concurrent connection to reduce the queue.

2. Apply the tuning exercise at runtime memory allocated to release the memory throughout the test execution by GC (garbage collector).


BOTTLE NECK : 2


Throughput:
  
Scenario:
         I design the scenario for 1000 users with 2 hours test execution.
ISSUE:

I observe during load test execution throughput behavior is normal until 19 min test and after that I observe throughput is completely down to zero.

Observation:

I observe during the load test execution was completely down at 19min of the test execution and the application is not accessible by manual. I also observe hit/sec is also simulate through the throughput graph which is causing the web server down.

Recommendation:

Recommended to the development team to do the tuning exercise to resolve in the web server to get response for 2 hours load test.

Resolution: the development team did some type of tuning to maintain the concurrence load for 2hrs test execution. The development team shares the resolution as shown below.
 
1. Apply the tuning exercise on web server concurrent connection to reduce the queue.

2. Apply the tuning exercise at runtime memory allocated to release the memory throughout the test execution by GC (garbage collector).


BOTTLE NECK : 3


Scenario:

Design the scenario for 5000 users with 4 hrs test execution which includes 1 hr ramp up time duration 2 hours.

Issue:

I observe the throughput 5000 users is gradually increase till 3000 users load on server and after that it become constant even if the load is gradual into 5000 users.

Observation:

I observe the network band width is utilizing maximum of 10MB which is available. So band width utilization is reaching to maximum available limit. Where it cannot access for the data to be transfer.

Recommendation:

        Recommend to the network administrator to increase  the bandwidth.

Resolution:

For the next test execution they increase the band width size from 10mbps to 20mbps.I have not observe any throughput issue in any next test runs.


BOTTLE NECK : 4


Scenario: 

I design the scenario for 1000 users in 10 hrs Endurance testing.

Issue:

I started  running endurance test as for 10 hrs duration but, I observe after the  6th hour all the transaction is failed and in the web logic server console I observe it keeps on throwing out of memory exception .

Observation:

I observe after 6 hour execution the jvm heap memory is getting down to zero and out of memory exception web logic server console. This is causing the memory leak.

Recommendation:

I recommended to the developer team to resolve the memory leaks in the application.

Resolution:

1.     The development team did some kind of tuning exercise and again I run the same test but I have not observe any memory leaks code tuning execution.
2.     After the code tuning still I observe the same issue. So we once again recommend to the development team to increase heap size 512MB to 1024MB and value is same time after increasing same. But I have not observed any memory leaks in the execution.  

BOTTLE NECK : 5

SCENARIO:

     I design the scenario with 2000 concurrent users for 2hrs test execution.

Issue:

 I observe after 1hr test execution all the database transactions are getting failed.

Observation:

  When ever I observe all the database transaction getting failed. I was looking in to JDBC connection to analyze is there any problem with connection establish from application server to database server.But I observe in the connection pool the maximum connection configuration 50.But during the load test execution all the connections are inactive and it is not establish the new connection to talk with database.


Recommendation:
     
 I recommend to the development team to increase the JDBC connection in connection pool.

Resolution:

  The development team to increase the JDBC connection from 50 to 200.And after that I run the same test, but I have not observe any JDBC connection issues.


BOTTLE NECK : 6

SCENARIO:

 I design the scenario for 1000 vusers with 2hrs test execution.

Issue:

 I observed in the test analysis one of the avg transaction response time is 28sec but the expected SLA is 6sec.I analyze the corressponding transaction is intracted with the database.

Observation:
 
 To drill down the above issue I took a help of DBA team and I run AWR reports to trace the top SQL statements. The DBA team identify there is a query which is causing high transactions response time which is belong to the current issue.

Recommendation:
     
I recommended to DBA team to apply a query tuning to reduce the response time to the quarry.
Resolution:

  After the quarry tuning I run the same test again now I observed the avg response time < 6.



Thursday, March 21, 2013

LR Basic Questions

1)      Which protocols are supported by Loadrunner ?

As of Loadrunner 9.5 following protocols are supported. This will increase with future releases. The interviewer is not looking for you to name all but a few (say 5-7 protocols).
Application Deployment Solution: For the Citrix protocol.
Client/Server: For DB2 CLI, DNS, MS SQL, ODBC, Oracle (2-tier), Sybase
Ctlib, Sybase Dblib, and Windows Sockets protocols.
Custom: For C templates, Visual Basic templates, Java templates,
Javascript and VBscript type scripts.
Distributed Components: For COM/DCOM, Corba-Java, and Rmi -Java protocols.
E-business: For FTP, LDAP, Palm, Web (HTTP/HTML), Web Services, and the dual Web/Winsocket protocols.
Enterprise Java Beans: For EJB Testing and Rmi-Java protocols.
ERP/CRM: For Baan, Oracle NCA, Peoplesoft-Tuxedo, Peoplesoft 8,
SAPGUI, SAP-Web, and Siebel (Siebel-DB2CLI, Siebel-MSSQL, Siebel-Web, and Siebel-Oracle) protocols.
Legacy: For Terminal Emulation (RTE).
Mailing Services: Internet Messaging (IMAP), MS Exchange (MAPI), POP3, and SMTP.
Middleware: Jacada and Tuxedo (6, 7) protocols.
Streaming: For MediaPlayer and RealPlayer protocols.
2) Which components have you used in Loadrunner ?
 Vuser generator - For generating Scripts
Controller - For creating and executing scenarios
Analyzer - To analyze results

3) What is load runner Agent.

Agent is interface between host machine and controller

4)  What is the process for developing a Vuser Script ?

There are 4 steps for developing a vuser script.
1-Record the Vuser Script .
2-Playback / Enhance the recorded vuser script.
3- Define the various run-time settings & check
4- Incorporate the script in a Loadrunner scenario

5) How many VUsers are required for load testing ?

The number of VUsers required depends on your system under test , network configurations , hardware settings, memory, operating system, software applications objective of performance test. There can not be any generic value for Vuser.


6) What is the difference in running the Vuser as a process and as a thread? Which is more advantageous way of running Vuser?

When Vuser is run as a process the same driver program is loaded into memory for each Vuser. This will take a large amount of memory and will limit the number of Vusers you can run on a single generator
When Vuser is run as a thread, only one instance of driver program is shared by given number of Vusers.  You can run more number of Vusers on a single generator using the multi-threading mode.

7) What is the significance of "Vuser-init "?

Vuser-init records the pre-operations also called the initialization operations before the actual application is run.

8) What is extended log?

An extended log will store information such as data returned by server and advanced trace, parameter substitution and much other information depending on the options you select in run-time settings.

9) Why do you create parameter?

To create a parameter you will replace the hard coded value within the script and replace it with a parameter.  This allows a single Vuser to be run many times, and to use different data on each run. It helps in stimulating more real life server demand as it prevents server from caching results.

10) How will you divide your script into multiple Actions? Why?

I will divide the script into Actions based on the functionality. For example, Once Action for Logining into Application, another Action for booking and so on.
Actions increase code reusability, reduce maintenance time and hence, decrease costs.

11) How can you set the number of Vusers in Loadrunner ?

You can set the number of Vusers in the controller section while creating your scenarios. Many other advanced options like ramp-up, ramp-down of Vusers are also available in the Controller section.

12) What are monitors?
Monitors are used to "monitor" performance bottlenecks. They are used in Controller section of Load Runner

13) What are the types of check points is available in LoadRunner?
Loadrunner provides two types of check points
a) Image Checkpoints : This checkpoint will verify the presence of an image on a page during run-time
b) Text Checkpoint : This checkpoint will verify the presence of a text-string on a page during run-time
Both of the above checkpoints can be added in Vugen.

14) What kind of problem we can face regarding hardware, software,  network and memory bottleneck during the performance test?

The possible issues amongst others could be -
1. Lack of Hardware
2. Memory Leakage
3. Network related issues.
4. Applicaton/Software error

15) What would be your recommendation to improve performance measure?

Fine Tuning of network, database, and app and web server is recommended.
At the network level try to optimize the latency and bandwidth.
At database level, verify all indexes and sequences by running profilers. You may also optimize your database queries.
At the App server level, run profilers for finding the memory leaks in the application
At the web server level you can use monitors and optimize the throughput and other related metrics of the server.

16) What is Rendezvous point?

Rendezvous point is Synchronization/Wait point . Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task.
The significance of this is to emulate some heavy load only to particular portion of the scenario and test the behavior of the application.

17) What is Correlation?
Correlation is used to obtain data which is unique for each run of your test script (ex: session ids). While recording, these dynamic values are hard-coded in your script causing the script to fail during playback. Correlation is a technique where dynamic values are not hard-coded in your script but are extracted at run-time to avoid failure.

18) What is Manual Correlation?
Its correlation technique which uses function Web_reg_save_param() to identify dynamic values in your script.  It is important that your playback your script to verify that correlation is done successfully.



19) How do you identify the performance bottlenecks?

Performance Bottlenecks can be detected by using monitors.
These monitors might be application server monitors, web server monitors, database server monitors and network monitors.
They help in finding out the troubled area in our scenario which causes increased response time.
The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc

20) Which function is used to end a nested transaction ?
The function is -  lr_end_sub_transaction
Learn More about Transactions in this video.

21) What is the difference between transaction and transaction instance in loadrunner ?
A transaction is used to measure time between executions of certain statements
A transaction instance is used for performance analysis

22) While the script is running we find some values that may be need to be correlated? Is it possible to do manual correlation for those values?
NO. Its not possible to do correlation when script is running but you can make changes once script has stopped.

23) What is Elapsed Time in Load Runner?
Elapsed time designates how much time has passed since the launch of the current event and is measured differently for different screens as given below -
In Scenario Status Window - Elapsed time is measured from the moment you hit "Start Scenario" or " Initialize/Run Vuser?" button.
In "Vuser" window elapsed time is measured form the moment Vuser enters "running" state.

24) Does caching have a negative effect on your load testing results ?
Yes. Caching has a negative effect. Cache is temporary memory which stores your browsing history. When you visit a page for the SECOND time , the time required to load the page will be less than that required to load the page for your first visit since much of the information required to load the page is grabbed from the cache instead of the server. This will effect the response times in your test. Hence, it is recommended to turn-off caching.

25) What is the difference between Overlay graph and Correlate graph?
Overlay Graph: It will overlay the content of two graphs that shares a common x-axis
Correlate Graph: It will Plot the Y-axis of two graphs against each other.
Learn more about Analyzer

26) What is the difference between lr_error_message and lr_debug _message?
lr_error_message - Sends a error message to the LoadRunner Controller's Output window
lr_debug _message - Sends a debug message to the LoadRunner Controller's Output window


27) What is the difference between load , performance  testing ?
The objective of performance testing is to check whether an application loads/updates  within stipulate time limit (say 2 seconds). It uses metrics like response time , Requests per second. It is carried out under production - like load conditions.
The objective of load testing is to check scalability of the system. For example, finding out the maximum number of users supported by the system within certain specifications.

28) You have created several  Auto Correlation rules. A new tester on your team is preparing to record a group of scripts on the same application on his workstation. What can you do to provide the tester with the correlation rules?
I would  export the Auto Correlation rules to a .cor file, and then have the new team member import the .cor file into his Auto Correlation rules

29) You want to emulate a call center for an airline. All representatives login in the morning, perform their business processes, and log out at night. In one day, a representative will Create 40 flight reservations, Modify 10 flight reservations, and Search for 20 flight reservations. A representative cannot perform a Modify without performing a Search first. How would you design the run logic ?
Create - 67% Search - 16% Block0 - 17% Search Modify

30) Where should you add a web_reg_save_param function to a script?
Before the step that retrieves the dynamic value

31) You want to have each step in your script measured as a transaction in the Controller and not shown in the Replay Log in VuGen. How can you accomplish this?
This can be done by enabling  the automatic transaction in the Run-time settings

32) Which web protocol recording level generates the web_submit_form function?
The URL protocol generates this function.