Serendipity

Friday, October 13, 2006

Points to Remember for Performance Testing

Launching an e-commerce website is a gargantuan task which requires complete understanding of the undeylying business and needs a sophisticated strategy.Understanding the underlying business results in the design of the application in a smart and simple way and devising a good strategy results in the hosting of a successful e-commerce site.

In general performance testing and load testing plays a crucial role in the success of the busniess model on the net as it is indirectly related to the user's experience with the site.There is one saying that users will respond with feet when they are doing some transactions on the e-commerce site.If the response time is reasonable,they continue business on that site otherwise they just simply walk away from the particular site.Moreover we can say that the proverb slightly transformed from "Slow and steady" to "fast and perfect" with respect to website's performance.In this article i don't want to discuss how we can increase the performance of a j2ee application or .net application as it spans tens of pages to cover, insteaed i would like to present some general concepts which may increase the results of the performance testing.

Statistics showing that in majority of the cases response times derived from the performance testing done outside the production environment are not able to reflect the same response times in the production environment in the real time.The basic reason is testing environment not reflecting the production environment.

In reality,it is difficult or impossible to set up a testing environment which exactly resembles the production environment in all the aspects especially in terms of hardware and the no of users simultaneously acccess that system.But testing environment should be configured in such a way that it could be the miniature version of the production environment.In our technology jargon,it is called as scaled down version of the original environment.

In my opinion,the framework which is used to do performance testing plays very important role in the success of the e-commerce site in the production environment.Framework is the one document kind of thing which is used to store the various kinds of details which are provided as input to the different types of performances testing.

So preparation of performance framework is very tricky and there are no standard rules to prepare a performance framework.We can assume this is an artistic process where our intution and our out-of-box thinking plays a lot in the preparation of performance framework document.

Analysing the underlying user's browsing habits helps a lot in preparing the load matrix which directly influence the performance results from the testing environment.If the load matrix is correctly populated which is in sync with the users occuring in the production environment then there are more chances in the success of the site but reverse is also absolutely correct.Load matrix contains the details of the number of hits on the site with respect to time.Using this we can find the times when load can be extreme and when the load can be nominal on the site so that we can generate the appropriate loads in the testing environment.

For ex,the load matrix is one which is constructed to use for an online brokerage(shares) e-commerce site and online books store's performance testing is different.Here we have to analyse the user's psychology and the times in a day in which a particular end user shows interest in doing a transaction and the type of transaction.In Online shares case there are some specific times in which we can expect a lot of load like the timings in which that particulr stock exchange makes its transactions.After stock exchange closed its transactions in a day, the traffic on site may drastically reduce.

And other important thing is what type of transactions end users are participating in.This is a very difficult and tiresome activity to explore the end user's transactions.Most of the time we use the historical data that is available from the company itself or from the industry to which this particular business belongs to .

Assume that a company is hosting a new site to make their company available online to the end users and historical data is not available regarding the customer's browsing habits as it is the first time going for online.So this company hosted the site and expectig traffic.At this point we have to keep in mind the diversity in the user's transactions and type of resources they consume to perform those transactions.Let us assume that we are visting this site for the first time and so we are requesting the information related to the company and the services they are providing.All this information is served by the web server in the typical environment and that too as this information is static that is served by the webserver's cache.This type of transaction is the most expeted request on the newly hosted site.Once we interested in this particular site you will go for registration which consumes some resources which are significant like database access.But this is also not considered as heavy transaction as most of the complex concepts which will come into scene are not applicable to this transaction.Only excepting is these type of transactions consume more resources than the basic transactions.

Now we started doing transactions by buying some shares or books and we have our own shopping carts.And when we are doing this type of transactions all the concepts like concurrency,locking and transaction managemet etc are come into scene which consume resources having greater chance of creating bottlenecks.So these are the transactions if accumulate, as the time progressing.results in the reduction of response times and some times completely force the site to down.

For clarity,let us categorise the above mentioned three transactions into normal,medium and complex depending on the resources they consume.Most of the faults will occur at this place.Suppose framework is prepared saying that 10000 users simultaneously access the site but the missing part is what type of transactions they will do.Identifying which type of transactions will hit the site requires a lot of work and it is a continuous process to make the site well responding.Let us assume that the performance requirement for this site is at any time it should support 10000 users simultaneously.If we generate this much of load on the site using VUG(virtual user generator) then site respond in such a way that response time is compliance to the requirement.That means that the requirement is not successfully tested.

As the time progresses a more number of users may registered in the site and their type of transactions on the site become complex as they no way request the basic and static information.Most of these transactions require highly sensitive resources.So from this time everything will change dynamically and the maintinence people have to always monitor the site traffic and make the respective changes to the application to remove the bottlenecks and make it respond consistently.

Other consideration is to whom the site is going to serve.Some sites serve only to specific people like Baazi serves to indian people and Amazon and ebay which receive the requests from around the world.Sometimes a special ocaasion will get extreme load on a specific site.A good ex for this is load on Andhra pradeha govt's site when 10th class results released.So by aware of this situation the maintinence people has to scale up the processing power temporarily to serve the expecting hits.After that day particular day passed,nobody interested in govt site.So there are a lot number of scenarios to consider while attempting performance testing.

0 Comments:

Post a Comment

<< Home