Install oha Load Testing Tool on Ubuntu 24.04

Install oha Load Testing Tool on Ubuntu 24.04

The oha is a modern, high-performance command line tool for load testing websites and APIs. It allows users to simulate high traffic with customizable HTTP requests and concurrent connections. This tutorial demonstrates how to install oha load testing tool on Ubuntu 24.04.

Install oha

Download executable to /usr/local/bin directory:

sudo wget -qO /usr/local/bin/oha https://github.com/hatoo/oha/releases/latest/download/oha-linux-amd64

Set execute permission for file:

sudo chmod a+x /usr/local/bin/oha

Use the following command to check the oha tool version:

oha --version

Testing oha

There are several ways to utilize the oha command. For example, the command below performs a load test by sending 50 requests concurrently with 10 users to a specified website URL:

oha http://192.168.0.227 -c 10 -n 50

The test results are presented in the following format:

Summary:
  Success rate: 100.00%
  Total:    0.7758 secs
  Slowest:  0.1909 secs
  Fastest:  0.0403 secs
  Average:  0.1422 secs
  Requests/sec: 64.4505

  Total data:   655.47 KiB
  Size/request: 13.11 KiB
  Size/sec: 844.90 KiB

Response time histogram:
  0.040 [1]  |■■
  0.055 [1]  |■■
...

Response time distribution:
  10.00% in 0.1281 secs
  25.00% in 0.1294 secs
...


Details (average, fastest, slowest):
  DNS+dialup:   0.0004 secs, 0.0003 secs, 0.0004 secs
  DNS-lookup:   0.0002 secs, 0.0001 secs, 0.0002 secs

Status code distribution:
  [200] 50 responses

Uninstall oha

To uninstall oha, delete the associated file:

sudo rm -rf /usr/local/bin/oha

Leave a Comment

Cancel reply

Your email address will not be published.