Install wrk Load Testing Tool on Ubuntu 24.04

Install wrk Load Testing Tool on Ubuntu 24.04

The wrk is an HTTP benchmarking tool used to test the performance of web servers by generating a significant load. It allows users to measure how many requests per second a server can handle, as well as its response times under high traffic conditions.

This tutorial shows how to install wrk load testing tool on Ubuntu 24.04.

Install wrk

Update the package lists:

sudo apt update

Use the following command to install wrk:

sudo apt install -y wrk

The wrk version can be checked with the following command:

wrk --version

Testing wrk

The wrk command provides various options to perform load testing. For example, the command:

wrk -c 10 -d 10s http://192.168.0.227

This command runs a load test on the server using 10 concurrent connections (-c 10) for 10 seconds (-d 10s).

The command will generate metrics like requests per second and latency, helping to evaluate the server's performance.

Running 10s test @ http://192.168.0.227
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    42.35us   19.45us   0.92ms   83.85%
    Req/Sec   116.06k    12.27k  145.20k    68.16%
  2318370 requests in 10.10s, 1.86GB read
Requests/sec: 229551.61
Transfer/sec:    188.71MB

Uninstall wrk

To fully uninstall wrk along with its dependencies, run the following command:

sudo apt purge --autoremove -y wrk

Leave a Comment

Cancel reply

Your email address will not be published.