Andrew Fletcher published: 16 July 2020 (updated) 29 March 2021 2 minutes read
Load testing verifies the system performance under the expected peak load. The peak load needs to set by a series of parameters that you have benchmarked targets. For example, these parameters could include:
Load testing:
- 20,000 concurrent users; and
- response time of under 4 seconds
Stress testing:
- Verifies the server performance under extreme load. Test this through examining how many users are required to bring your server
Endurance testing:
Load test over an extended period of time
Check with your hosting provider
Before you begin to performance test - check with your hosting provider if their infrastructure allows for performance testing. In some environments, hosting providers won't allow for performance testing even on dedicated server.
Action plan:
Step 1:
- Complete your benchmarking documentation. Unless you have something to target what is the point
- Infrastructure monitoring and profiling to identify bottlenecks and potential failures
- Out of resources (bandwidth, memory, CPU, database)
- Configuration including server and code (such as Apache and PHP)
Step 2: Tool selection
- Protocol
- CURL request
- Note the testing doesn't load like a regular person forgoing images and AJAX requests
- Open source tools - JMeter, Locust, Gatling
- SAAS - BlazeMeter, Flood.io
- CURL request
- Browser
- Load the full page - there including images, AJAX requests. This is important if your site uses client side requests. However, concurrency is limited
- Open source tools - Selenium
Step 3: Script creation
- Language type - javascript, python, etc
- Scripts can be
- Simple: visit home page, search page or content pages
- Complex - Login as a user
Step 4: Monitor performance
- Number of users. Start low and ramp up. For example, begin with 100 and ramp up to 5000. If this is an initial test, then have lower presets.
- Trace response time in real life. Check how many users against time.
- Look at the apache and memory performance
- Check the logs
Related articles
Andrew Fletcher
•
04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher
•
26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher
•
17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...