Key takeaways

  • Response times alone cannot tell you whether the server is saturated or merely waiting.
  • Watch the load generator too, since a saturated generator caps the test rather than the target.
  • Correlate resource use with the load curve; the point where they diverge is the finding.

In order to make sure that your application will not break under a heavy load, a web application owner has to perform some basic performance tests.

Is Your Infrastructure Ready for Global Traffic Spikes?

Unexpected load surges can disrupt your services. With LoadFocus’s cutting-edge Load Testing solutions, simulate real-world traffic from multiple global locations in a single test. Our advanced engine dynamically upscales and downscales virtual users in real time, delivering comprehensive reports that empower you to identify and resolve performance bottlenecks before they affect your users.

View Pricing
Real-time insights
Discover More
Global scalability

Here are 4 simple steps how to achieve this with LoadFocus load testing tool:

  1. Log into your account on the LoadFocus platform
  2. Click on the “New Load Test” menu
  3. Enter the details of your web application (the endpoint/URL that you want to access, the number of clients per second and the number of seconds that the test will run) – check image attached for an example
  4. Before starting the test log into your server and use the script that we provide for monitoring the CPU and memory as below (the script is developed for Linux servers):
    1. copy the script cpu_mem_stats.sh to the server where your application is installed: click here to download script.
    2. run the following command:
      
      chmod 777 cpu_mem_stats.sh
      
    3. run the following command:
      
      ./cpu_mem_stats.sh -p node -t 200 -f /home/ubuntu/log.txt -c true
      
    4. the meaning of the parameters is (please modify according to your needs):
    • -p – The process name to look for
    • -t – The time to monitor specified in seconds
    • -f – path to the file to write the output (if not specified the output will be logged into the console)
    • -c – if specified as true will output in CSV format
    1. Start your load test from LoadFocus.com
    2. The result of the response times will give you a graph like this:
    3. After the test ends get the result from the stats test on your server (in our example log.txt)
    4. For creating the graphs from the result files we recommend the following online solution: https://plot.ly/ . From that you will get a graph similar to:
    5. Now by using the graphs from LoadFocus and the results from the cpu_mem_stats.sh you can correlate how you server is behaving under load, which will give you an idea if the machine needs to be upgraded or is enough to support the load your clients will generate.

Frequently Asked Questions

Why measure CPU and memory if I already have response times?

Response times tell you the system is slow but not why. A server at 30 percent CPU with rising latency is waiting on something else, usually a database or a downstream call, and that is a completely different fix from a saturated server.

Think your website can handle a traffic spike?

Fair enough, but why leave it to chance? Uncover your website’s true limits with LoadFocus’s cloud-based Load Testing for Web Apps, Websites, and APIs. Avoid the risk of costly downtimes and missed opportunities—find out before your users do!

Effortless setup No coding required

What should I watch on the machine generating the load?

The same metrics. A load generator that runs out of CPU or file descriptors quietly caps the traffic it produces, so the test flatlines and the target looks healthier than it is.

What am I looking for in the numbers?

The point where resource use and the load curve stop moving together. While they climb in step the system is coping; the moment they diverge you have found the bottleneck worth investigating.

Related reading

Chris
Head of Content at LoadFocus

Chris leads content and oversees development across the services this blog covers. The guides and tool comparisons here come out of the same decisions that shape what ships.

LoadFocus is an all-in-one Cloud Testing Platform for Websites and APIs for Load Testing, Apache JMeter Load Testing, Page Speed Monitoring and API Monitoring!

Effortless setup No coding required

How fast is your website? Free Website Speed Test