Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Test website load using AB (ApacheBench)

By editor , 15 December, 2017
Question

How to test a website load test using ApacheBench (linux command ab) ?

The apache benchmark tool is very basic, and while it will give you a solid idea of some performance.

Some parameters:

-c: ("Concurrency"). Indicates how many clients (people/users) will be hitting the site at the same time. While ab runs, there will be -c clients hitting the site.

-n: Indicates how many requests are going to be made. This just decides the length of the benchmark.

-k: This does the "KeepAlive" funcionality browsers do by nature.

A high -n value with a -c value that your server can support is a good idea to ensure that things don't break under sustained stress: it's not the same to support stress for 5 seconds than for 5 hours.

Examples :
ab -k -c 350 -n 20000 example.com
ab -c 10 -n 100 http://example.com/my_page

Tags

  • WebService
  • Server
  • Linux
  • Utility

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer