You may have heard of 'performance' or 'performance testing' within the industry and your organisation. In this post I will cover off the basics on what software performance is, why it matters, and what you can do to manage it.
In this post I will cover:
- What is software performance?
- Why does performance matter?
- What is performance testing?
- How do performance testing tools work?
What is software performance?
Performance is a property of a software solution. We measure performance in three ways:
- Response time measures the experience of your users. An example of response time is how long it takes a web page to render or how long it takes to run a report. Response time measures the time between the user clicking a button and the page or screen being fully loaded. This is especially important when your users are your customers.
- Stability measures whether your solution works correctly and continues to work correctly over prolonged periods of use. An example of a stability issue is a memory leak, which is where a piece of software unintentionally fills up the memory on a server, ultimately leading to a system failure. Stability is measured by looking at failure rates and monitoring the underlying infrastructure.
- Capacity measures how much load your solution can cope with. Capacity can be measured in many ways; web pages viewed per hour, concurrent users on a system, number of business transactions completed per minute, etc. Understanding the capacity of your solution also helps in correctly scaling the hardware to support it.
Every performance issue will fit into one or more of the three categories above.
Why does performance matter?
Software performance matters when:
- Your solution has or will process a large volume of load. For example, if there are thousands of users in your organisation who use it every day, or your system is expected to process a large volume of transactions, then capacity matters.
- A system outage is linked to the revenue of your organisation. What would the cost be if your software solution was down for an hour? A day? If the costs are severe then the stability of your solution matters.
- Your solution is customer facing. The responsiveness of your solution is directly linked to the experience of your customers, and therefore your reputation and revenue. In this case response time matters.
- Human wellbeing is at stake, for example, many systems found in the healthcare industry. In that case stability, capacity, and response time all matter a great deal.
What is performance testing?
A common approach to avoiding performance issues in the real world is to test your solution for performance issues before going live. In general, the earlier you detect an issue the more cost effective it is to remedy.
Performance testing is the discipline of testing the stability, capacity, and response time of a software solution. There's a lot involved in performance testing but at a very basic level we use a tool to simulate the real world activity of the users on a system. We then observe how the system behaves under load to determine its capacity, stability, and response time.
How do performance testing tools work?
Performance testing tools (specifically, load testing tools) simulate the conversation between a client and a server at a large scale (simulating many users doing a lot of business activity).
Let's use a metaphor to explain. Imagine a café. Each customer who walks in is a client. The staff in the café are the servers.
Let's say a customer walks in, asks for a flat white (coffee with milk), hands over some money, and eventually receives the flat white. This is the same as it is with computer systems - a client makes a request, the server then processes that requests and provides something back to the client in their response.
If we built a load testing tool for a café we might bring a couple of dozen actors to the café. We'd ask each actor to repeat what the first customer did by writing them a "script" of what to ask for. We'd set the frequency to which our actors entered the café to control the throughput (maybe one every 30 seconds, for example). We'd tweak the actors so they ordered different things by altering the script we gave them - some would ask for soy milk, maybe some a coffee and a muffin. By doing this we're testing the capacity, stability, and responsiveness of the staff (servers) in the café.
Load testing tools work the same way. In the real world multiple users interact with a web browser on a device such as a PC, tablet or smart phone. The web browser sends requests over a network to an application:
A load testing tool jumps in at the network level and simulates this same conversation between the browser and the application. This is often achieved by "recording" the network traffic sent and received while a real user interacts with the application. The tool can then replicate the traffic multiple times to simulate multiple users interacting with your solution:
We can also modify the network traffic to interact in a dynamic way, for example we could give each user their own credentials, and let them pick different options in the application. This allows us to simulate realistic activity against a software solution. While simulating multiple concurrent users we observe the behaviour of the system under test to measure its stability, capacity, and response time.
So that's what software performance is and why it matters. Remember that whether you performance test depends on the degree to which the stability, capacity, and response time of your application is tied to the reputation and revenue of your organisation. This should also inform the scale of testing you undertake.
If you think you have a solution which needs performance testing or are looking for advice Equinox IT is here to answer your questions.