Sunday, 31 March 2013

Industry standard for loading time of a website

Here I am giving some Industry standard response time. This is very useful when we don't have any data.

Response time to display web pages: 
- 3 seconds considered excellent 
- 3-5 second acceptable 
- over 5 seconds and it is not a search, considered unacceptable. 

For a search transaction, anything upto 7-8 seconds is considered acceptable. 

For web services, under 1 second is excellent. 
Upto 3 seconds may be acceptable. 

Friday, 15 March 2013

How to capture all dynamic value in a text file

Place below code in vuser_init() section:

long InvoiceRequestID_file;
char *InvoiceRequestID="c:\\InvoiceRequestId.dat";



Place below code in Action part:

Here InvoiceRequestId is the variable name that in web_reg_save_param();

if ((InvoiceRequestID_file = fopen(InvoiceRequestID, "a+")) == NULL )
 {
  lr_error_message("Cannot open %s", InvoiceRequestID);

  return -1;
 }

 fprintf(InvoiceRequestID_file, "%s\n",lr_eval_string("{InvoiceRequestId}"));
 fclose(InvoiceRequestID_file);


Output: All value of InvoiceRequestId will be captured in InvoiceRequestId.dat file and new value will be append at the end of file.
Note : No need to declare a+ anywhere as it takes as the string.

Saturday, 10 November 2012

How to do LR web services scripting

First make sure that you can run the request on SOAP UI. Then go to File->Preferences->Proxy Settings and add proxy settings as follows, 

Host Name : your machine name 
Port 7777 
User Name: your domain user id 
Pws : your domain pwd 
Select enable using proxy. 

Then go to LoadRunner -> Recording options ->Advance -> Change Recording Engine to user the Old one. 

Then start recording. Enter yes to all the popups. Once you see the recording tool bar just hit the play button on SOAP UI. That will capture the request into LR. After that you will not need SOAP UI at all. Just use LR script just like a regular script. Please note that you can parametrize in the script however if the SOAP request is secured then you need to record the request as explain above for each input.

Open Source Profilers in Java

You can go the the URL"http://java-source.net/open-source/profilers" where you could find whole lots of open source profiling tool or api.

Server xyz has shut down the connection prematurely

First thing "Server xyz has shut down the connection prematurely " is not a webserver issue. 
This is purely load runner issue and is one of the major pain area. 

Try Following: 

1. Make sure we are not ramping up all user simultaneously 
2. Rendezvous point is not holding up too many users. 
3. Make sure retry option is greater than 5 
4. Check network connectivity or blockage. 
5. Decrease the load from load runner machine 
6. Clear the Temp folder in (Documents and Settings-->user-->Local Settings)-->Temp 
and restart the machine on which LoadRunner is installed (This one is my favorite, it has always helped me in getting rid from this error, but the condition is that scripts ran successfully before and now you suddenly start seeing this error) 
7. Recently I observed that if we suddenly start seeing this issue, then best option is to restart all machines and servers in your network or load test domain. I cant explain the reason behind it, but it works :) 

Put this in script, not a solution but just the workaround. 
web_set_sockets_option ("NEW_BEHAVIOR_OF_OVERLAPPED_SEND", "1"); 
If none of the above option helps then put web_set_sockets_option("IGNORE_PREMATURE_SHUTDOWN", "1"); in vuser_init() 

You can also following 
Run time settings --> Preferences --> Use WinInet Replay instead of Sockets (windows only) 
but it worked in very specific cases. Not a general solution. 

Note: Point 3 :" Make sure retry option is greater than 5 " is applicable only for Oracle 10g application.

Sunday, 8 July 2012

AIX Operating system

Now a days AIX opearting system is very popular and most banking company is using this operating system.

AIX is a UNIX operating system running on special hardware with power processors. it offers quit extensive virtualisation abilities using so called LPARs and supports real big number of CPUs and large RAM

In AIX OS CPU utilization is always more than 90%. It does not mean that CPU is the bottleneck. In this case we need to check the Paging counter to find the memory bottleneck.
Three Edition of AIx operating system are:
AIX Standard Edition: The current maximum capabilities of the Power Systems™ platform of up to 64 cores or 256 threads in a single partition.
AIX Enterprise Edition:
AIX Express Edition:
 

Monday, 2 July 2012

Load Balancer in perf

Load Balancer is  just like a network card that used in the switch.

                                   OR

Sometimes the same physical device serves as any combination of firewall, proxy server, router, and/or load balancer. Sometimes the load balancer is an actual hardware device with the software embedded (sometimes referred to as a content switch), while other times the load balancer is just software installed on a machine of your choosing.

Load balancers often have three types of logic for distributing incoming HTTP requests. They are:
1.Round-robin: With this method, the load balancer simply takes each incoming request and sends it to the next Web server. For instance, if Figure 1 represented our actual environment, the first request to reach the load balancer would be directed to Web server 1, the second to server 2, the third to server 3, the fourth to server 4, and the fifth back to server 1.

2.Sticky sessions (cookie-based): The round-robin form of load balancing completely ignores the concept of user sessions, so that during a single session one user could be passing requests through several different Web servers. For an e-commerce application, this won't work. For these types of applications, on sites that use sessions, the load balancer needs to be able to identify a particular user and keep that user pointed to the same Web server throughout the entire session.
Even this doesn't ensure a balanced load on each server. If somehow all of the users assigned to Web server 1 spent hours using the application and all the other users just spent minutes, Web server 1 could get overloaded while the other servers went underutilized. That's why many load balancers have dozens of load-balancing options and algorithms. They may balance by total traffic volume, they may monitor the resource utilization on the Web server to decide which server is least utilized at the moment the next request is received, or they may exercise any number of other possibilities

3.Sticky sessions (IP-based): incoming traffic is “stuck” to a single web server based on the IP address of the requesting client. If a server goes down, the sessions that were tried to it are distributed to other servers.

Some Load balancers are:Nginx reverse proxy load balancer,HAProxy

Good links are:
http://community.neustar.biz/community/wpm/blog/2009/02/02/tips-for-testing-with-load-balancers
http://www.ibm.com/developerworks/rational/library/4784.html/

How to Change Password of IUSR_METRO Account

Sometime we need to change the password of IUSR_METRO Account. This may be required due to compliance issue. Below are the steps to chang...