My Recent Posts
How To Get The Most From Load Testing Reports
Load testing tools generate a lot of data. Determining which data points are relevant and should be included in reports is a skill that a developer should nurture. There are some questions that a developer should ask themselves when looking at raw reports from a load testing tool. A developer should consider the user scenario being used for the load tests. This will involve looking at the number of pages being tested and whether the users should be geographically spread out. A developer should also look at the trend of the initial test results i.e., is the graph an exponential or liner curve and does the curve have a plateau where there is no change in performance.
One of the first things a developer should look at is the number of steps in the user scenarios. If the user scenario is very long, a developer should break it down. As an example consider load testing a checkout process for an ecommerce site. The developer can load test various parts such as billing separately from the inventory system. A developer should also look at the load time and metrics for individual web pages and objects that are being tested. If the initial reports for the tests show an exponential curve, this is a sign that the server is overloaded. If the curve plateaus after a certain point, this might indicate that there is no more bandwidth available. Another factor that can cause performance issues is the load times for static objects compared to dynamic objects. You should consider testing static objects separately from dynamic objects (you can learn more about how to do this by visiting dotcom-monitor.com/load-testing or by clicking here).
If you want more information about your server, you should install a metrics agent on the server. This is a program installed on the server that logs detail resource usage metrics on the server and sends them back to the load testing software for reporting. You can also export the data from the load tests to more powerful data analysis tools such as Excel and R.
Advantages Of Continuous Load Testing
Most proficient web developers test their software after they have finished building major releases. Many developers follow a simple testing process whereby they finish creating a system and then perform their load and stress tests. This approach has its disadvantages when creating high performance applications and websites in a large team. When large teams create software multiple changes are made daily. Each of these changes has an impact on the systems performance. If the team waits for a major release before load testing, they will be unable to remove all performance bottlenecks. The remedy for this scenario is to perform continuous load testing during all stages of the software development lifecycle. They are many tools that a development team can use for continuous integration and continuous delivery such as CircleCI, TeamCity and Jenkins. One can also use load testing cloud providers, who provide APIs for load testing.
Continuous delivery and testing allows developers to compare performance and load times before and after changes are made to the system. In some instances continuous testing allows the team to spot performance degradation caused by external changes from network and service providers.
Continuous load testing and integration will create some challenges for a team. Investments will need to be done to create systems devoted for generating load. Another significant challenge is that load tests are not done every time like unit tests or functional tests. This situation may result in a scenario where testing infrastructure will be idle for long periods of time.
These challenges can be mitigated through use of virtualization, containerization and use of cloud computing. If one uses cloud computing, they will only pay for resources used during the actual load testing. Virtualization and containerization tools such as Docker and Kubernetes allow one to load balance their testing workloads; load generation capacity will be increased as needed in the system. Continuous testing also makes reporting a challenge. Continuous testing creates a lot of data and choosing the appropriate data points for monitoring and reporting is a nontrivial task. Despite the effort involved in implementing continuous testing teams will reap the benefits of load testing once the initial set up has been completed.
Using Tsung For Load and Stress Testing of Web Servers
In web development load testing entails putting demand on a web service or website and assessing its response. Load testing is usually used to observe how the website will perform under peak load. Modern web developers have numerous options for performing load testing on their websites. There are cloud based options such as loader.io, Cloudtest, NeoLoad, WebLOAD and Silk Performer. There are other options which can be run on a local network such as Apache JMeter, BlazeMeter, Tsung and Gatling. In this article we will look at Tsung in detail and the various pros and cons that one may encounter.
Tsung is an open source load and stress testing tool. It is written in Erlang, which is a language suited for concurrency, allowing it to better utilize CPUs that have multiple cores. Tsung supports various protocols such HTTP, HTTPs, LDAP, SOAP and XMPP. Tsung can also be used to stress test PostgreSQL and MySQL databases. Tsung can also monitor operating system performance metrics such as memory, network traffic and CPU utilization using Erlang agents, Munin or SNMP. Tsung provides HTML reports that displays performance of the system during the load test.
Tsung is only available on Linux. On Ubuntu installing Tsung is as simple running sudo apt-get install tsung.
You can also use Tsung to load test web servers as mentioned in the title. In fact, WebHosting Buddy did this when they put compared Bluehost vs GoDaddy in a head-to-head matchup. In their testing, they found that overall, Bluehost did a better job of standing up to the HTTP request load and was overall more responsive than GoDaddy, which honestly, isn't surprising from the experience I've had with them overall. In fact, I'm honestly not the only one who's had a poor experience with GoDaddy, but that's a topic for another day. Let's get back to Tsung and load testing.
On other Linux distributions you can install Tsung from source or using the deb files from Github. Load tests are created using XML files and running tsung with the file as a parameter. The XML file allows you to specify the number of requests to be made, the number of CPUs to use and the IP and port of the server. You can also specify the arrival rate of the requests to the server being tested. Requests arrive randomly modelling real life operation of the server. Requests to the server can also be made depending on your website. You can create JSON requests and XML requests. Tsung can also create dynamic requests that change based on a percolator engine. Another interesting feature in Tsung is the distributed feature. Install Tsung on all multiple clients and you get a report of the server’s performance to under distributed load.