Software Performance Testing Handbook
A Comprehensive Guide for Beginners
Moving towards Performance Engineering
As discussed in earlier chapters, mere plans for Performance testing during the end of the SDLC cycle is considered as a reactive approach wherein Performance Engineering approach aims at integrating the performance engineering activities from starting of the SDLC to build a system with high performance. Thus, Performance testing forms a subset of the Performance Engineering activity. Accordingly, the competencies required for a performance engineer is little different from the performance tester.
Software Performance Testing is the act of evaluating the software system for its performance and finding the bottlenecks in the system. Software Performance Engineering is the systematic approach of constructing the software that meets the performance objectives.
Nowadays, IT companies have slowly started adopting the performance engineering activities for critical applications though 70-80% of them have adopted mere performance testing activities.
Queuing Theory is the mathematical study of waiting lines (or queues). It is interchangeably spelled as Queueing Theory or Queuing Theory. It is considered as a branch of Probability Theory and Operational Research as it is used in making business decisions. It is used in various fields like telecommunications, networks, traffic management, etc. The notation for describing the queuing model was first introduced by David .G. Kendal in 1953.
The figure represents a model of a single queue. Jobs arrive at the queue from the input source, each job bringing a demand for service from the queue. If the queue becomes full, the arriving job is not allowed to join the queue. If the job enters the queue, it may compete with other jobs for service from the queue. When a job completes its service, it departs the queue. We identify models in this class by describing the input source (how jobs arrive), the demand jobs that it brings with them, the rules by which they compete for and receive service, and the capacity of the queue. Thus the elements of the queue includes the input process, service mechanism, queue discipline and output process.Queuing theory provides answers like mean waiting time in queue, mean response time, service time (service demand), user request arrival pattern and the distribution of users in the system, etc.
The Queuing system can be classified into 2 broad categories as Open or Closed System.
A system can be classified as Open or Closed based on certain characteristics it possesses.
Open System
These systems are usually internet facing where the request jobs arrives the system from outside externally and the arrival pattern of the requests are independent of the way the system processes the incoming requests. Thus the load on the system at any point of time is the external decision. The server workload for such systems can be represented as arrivals per unit time.
Closed System
These systems are usually client-server systems where the behavior of incoming request jobs are influenced by the server processing mechanism. The requests circulate continually forming a closed loop. Normally users fire a request, get a response from the server and think for certain amount of time (think time can be zero or non-zero value) and then again fire the request. Thus the load on the system at any point of time is decided by the system. The server workload for such systems can be represented as the number of users and think time.
The operational analysis is a set of basic quantitative relationships between performance quantities. The operational analysis is used to establish relationships among quantities based on measured or known data about computer systems.
Capacity planning is the process of determining what hardware and software configurations are required to adequately meet the application needs. It helps to define the hardware and network infrastructure needed to handle the expected and forecasted server load. Thus the goal of capacity planning is to provide satisfactory service levels to users in a cost-effective manner.
Capacity planning is carried out by measuring the number of requests the server currently processes and how much demand each request places on the server resources. Using this data, the resources (CPU, RAM, disk space, and network bandwidth) necessary to support current and future usage levels can be calculated.
Why Capacity Planning is required
The first and foremost reason is the user experience factor. Consider a system that can support only a given number of concurrent users while guaranteeing a reasonable response time. As many of us have experienced, when traffic increases on a major Web site that isn't adequately equipped to handle the surge, the response time deteriorates significantly. Am sure that many of us have experienced situations where sites, say payroll, when traffic increases (during last day of the month) on the site, the site isn’t adequately equipped to handle the sudden spike and hence resulting in response time deterioration. Studies have shown that if a site's response time is more than 10 seconds, then end users tend to leave. This is generally a bad thing and should be avoided, as there is no secret that a web site's downtime can result in a significant amount of loss to the business.
The second reason is that capacity planning helps you to decide how to allocate resources for a system in terms of the CPUs, RAM, Internet connection bandwidth, and LAN infrastructure needed to support the required performance levels and plan for future growth. Once we understand the limitations of the existing hardware configuration, we can estimate the amount of additional hardware needed to support any increased demands in performance.
Finally, capacity planning is important because it helps to answer the question of what hardware and software infrastructure is required to enable the current system to achieve expected performance objectives.
6 comments:
Hello Ramya,
Quite an interesting read. Have you applied any of these queueing techniques for coming up with cap planning in your projects?.
I understand queueing theory is great for cap planning. But honestly dont know if anyone is using it real time.
~Rajesh.B
Hi Ramya,
What a great BLOG! The information you're providing is excellent, and I'm sure it is greatly appreciated by those getting started in performance verification.
Your post on "Performance Engineering" is good. I've been developing software for over 20 years, and I have noticed a significant change in the software development process as it affects performance. Back in the "old days", computer resources were relatively scarce (CPU speed, memory, & bandwidth) so great care was taken in the design and implementation of software to ensure that it would meet performance requirements given the limited resources.
With the advent of cheap and plentiful computer resources, a new philosophy developed. This was the "make it work, then make it fast" approach. This philosophy sounded good, and the rationale was that after it was built you could find the bottlenecks and fix them. You'd only spend valuable optimization time in those areas that were actually problems. However, this approach creates two severe risks:
* You may end up with an architecture that can not achieve your performance requirements through simple post-implementation optimization, and
* Your post-implementation optimization may insert defects in otherwise good functionality.
It is my opinion that performance requirements should be given equal importance to the functionality requirements in large software systems design. Using modeling and simulation (as you mention elsewhere) is an excellent way to verify your design "up front" for both performance and behavior. You mentioned Ptolemy elsewhere which is a great free M & S environment. The tool that I use, which takes a very convenient "Resource Aware" approach is Foresight (http://www.foresight-mands.com/) which I helped develop. I and others have had great success using Foresight to predict resource utilization (CPU, memory, network) and performance (latency, throughput, etc.) for very complex systems.
"Design for performance" leveraging modeling and simulation is a must for today's complex systems!
Keep up the good work. I'll be tuned in.
Regards!
paul
Hi Ramya,
All of these Articles seem to be well explained concepts towards Performance Testing as a whole, Thanks for your Effort in publishing these self explanatory documents.
Thanks
Chandru
Hi Ramya,
A great blog and wonderful articles.. I have been reading scott's site for the last few years. Yours is much more simplified version of that and will be certainly useful for beginners.
btw, when is the entire book releasing? When can we have a copy of that? :-)
Hi Ramya
Good articles for performance engineers. worth to read it.
Why don't you upload the pdf file for your guide
Thanks
senthilnathan
Good articles about performance testing.
Why don't you upload the guide
Thanks
senthil
Post a Comment