Thursday, July 29, 2010

General Load Test Proposal

General Load Test Proposal

Prepared by: Henry Tsai , Software Engineer II
November 14, 2009
Proposal number:123-11478
Version : 1.0 Executive Summary
Objective
This Document describes approach of performing load testing on specified web site system.
Goals
The goal of this project is to deliver sizing information for web based system on the results of controlled load testing. This includes sizing for fast-cgi Application server and Apache servers. The project consists of running up to 300 users to simulate 10,000 concurrent connections. during a load test. This load test will be the first one executed with the developed load test with Apache JMeter or LoadRunner tooling based on the HTTP/HTTPS protocol over TCP/IP.
During development it will become more clear that this load test approach in combination with system infrastructure and software architecture.
Assumption
System is build in Clustered environment. Load balancer should have higher/same as performance as Citrix - NetScaler MPX 5500 model per server farm.
The average apache hit on web site is 30 ~50 hit/page ( including static/dynamic page content)
Maximum Number of Concurrent User is 300.
Solution
An option to use Load Test software to test system's response at unusually high or peak loads. Such as LoadRunner or Apache JMeter is suggested. 
LoadRunner from HP can take completed scenario result and prepares the necessary graphs for the tester to view. Also, graphs can be merged to get a good picture of the performance. The tester can then make needed adjustments to the graph and prepare a LoadRunner report. However, LoadRunner License fee could significantly increase cost of this project. License fee for 200 virtual user is around $44,000. License for 300 virtual users is around $55,000.(Currency is USD)
JMeter from Apache is open source software, a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Based on criterial of this project. A box with 3Ghz CPU can be used to perform 300 virtual users load test. or 2 boxes with 1.5Ghz CPU with distributed load test environment as an alternative. A comment here is if web site system returns a lot of XML response. more boxes are expected.
Test Focus
Service-oriented indicators are availability and response time; they measure how well (or not) an application is providing a service to the end users. Efficiency-oriented indicators are throughput and utilization; they measure how well (or not) an application makes use of the application landscape. Test focus will be focus on follows:
Availability : The amount of time an application is available to the end user. Lack of availability is significant because many applications will have a substantial business cost for even a small outage. In performance testing terms, this would mean the complete inability of an end user to make effective use of the application.
Response Time : The amount of time it takes for the application to respond to a user request. For performance testing, one normally measures system response time, which is the time between the user's requesting a response from the application and a complete reply arriving at the user's workstation.
Throughput : The rate at which application-oriented events occur. A good example would be the number of hits on a web page within a given period of time.

Untitled.png
In this project, when all page request content are all available and correct and all response time are within accept time-limit ( usually 2 seconds) and Throughput is within expected number, the result will be considered as pass.
Task List
Make sure System is table enough for performance Testing. ( Code must be freeze)
Identify and Scripting the Business-Critical transactions.
An example of ten transactions distributed among a total application concurrency of 1,000 virtual users.

Untitled.png

Perform Test based on Transaction distributed.
Deliver Report
Note
This Project use Ramp-up1 as Load Test injection profile.



References
Integrated Approach to Web Performance Testing: A Practitioner's Guide - B. M. Subraya, Jan 6, 2006
The Art of Application Performance Testing: Help for Programmers and Quality Assurance, Ian Molyneaux. Jan 1, 2009



http://jakarta.apache.org/jmeter/usermanual/jmeter_distributed_testing_step_by_step.pdf

http://www.citrix.com/site/resources/dynamic/salesdocs/DataSheet_NetScaler_Sept09.pdf

http://answers.google.com/answers/threadview/id/555953.html

http://jakarta.apache.org/jmeter/index.html

https://h10078.www1.hp.com/cda/hpdc/display/main/download_pdf_unprotected.jsp?zn=bto&cp=54_4000_100
http://www.paessler.com/webstress



Tuesday, July 27, 2010

Mindmap Tool - Novamind

I have found a good Mind-map tool to record requirement while doing System Analysis.
bundle2.png

Monday, July 26, 2010

Find Kth smallest in a given integer array java

public int findksmallest(int[] array, int k) throws Exception {
  if (k <= array.length && k > 0) { 
   for( int i =0 ; i < k ;i++){
          for ( int j = i+1 ; j< array.length ; j++){
              if(array[j] < array[i]){
               int tmp = array[i];
               array[i] = array[j];
               array[j] = tmp;
              }
          }
   }
  }else{
   throw new Exception("k is an invalid number");
  }
  return array[k-1];
 }

Sunday, July 25, 2010

Palindrome Checker in Java

public static boolean isPalindrome(String input){
  boolean result = true;
  for(int i = 0 ; i < input.length() / 2 ; i++ ){
   if(input.charAt(i) != input.charAt(input.length()-(i+1))){
    result = false;
   }
  }
  return result;
 }