Set up Siege Stress Tester on AlmaLinux 9: Best Benchmarking
This tutorial will guide you on how to Set up Siege Stress Tester on AlmaLinux 9. Siege is a valuable HTTP load testing and benchmarking utility, allowing you to assess the performance of your web server under simulated high-traffic conditions. Its ease of installation, often available through package managers like Homebrew on MacOS or the default repositories of many Linux distributions, makes it a convenient choice for quick performance assessments.
Siege offers extensive control through various command-line options, making it adaptable to different testing scenarios. Follow the steps below to complete the Set up Siege Stress Tester on AlmaLinux 9 on your Orcacore server.
Before proceeding, ensure you are logged into your server as a non-root user with sudo privileges. If you haven’t already, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Install Siege Benchmark Tool on AlmaLinux 9
Let’s dive into installing the latest version of Siege on AlmaLinux 9 directly from the source.
First, ensure your system’s package index is up-to-date by running:
sudo dnf update -y
Install Development Packages
To successfully build Siege from source, you’ll need the necessary development tools and libraries. Install them with:
sudo dnf groupinstall 'Development Tools'
Download Latest Siege
Visit the Joedog downloads page and obtain the latest Siege tarball. You can use the wget
command for this:
# sudo wget http://download.joedog.org/siege/siege-latest.tar.gz
Next, extract the downloaded archive using the following command:
sudo tar -zxvf siege-latest.tar.gz
Then, navigate into the extracted Siege directory:
cd siege-*/
Compile and Build Siege Stress Tester
Now, compile and build the Siege stress tester on your AlmaLinux 9 system. This involves configuring the build environment and then building the executable. Execute the following commands:
sudo ./configure --prefix=/usr/local --with-ssl=/usr/bin/openssl
sudo make && make install
This process might take some time to complete.
After the installation is complete, verify that Siege is installed correctly by checking its version:
siege -v
The output should resemble the following:

Now that you’ve successfully installed Siege on AlmaLinux 9, let’s explore some useful options for leveraging its capabilities.
These are some useful options for Siege:
(The original article only had an empty unordered list here. While keeping the structure, this section will be filled in the "Alternative Solutions" section below)
Alternative Solutions for Web Server Benchmarking on AlmaLinux 9
While Siege is a solid choice, alternative tools offer unique advantages. Here are two different approaches to web server benchmarking on AlmaLinux 9:
1. ApacheBench (ab)
-
Explanation:
ab
is a command-line tool specifically designed for benchmarking Apache HTTP server performance. However, it can be used to test any web server. It’s a lightweight tool, making it quick and easy to use for basic performance assessments. It sends multiple concurrent requests to a target URL and reports statistics such as requests per second, time per request, and transfer rates. Unlike Siege,ab
doesn’t support reading URLs from a file natively, requiring scripting for more complex scenarios. It often comes pre-installed or is easily installed with Apache utilities. -
Installation on AlmaLinux 9:
sudo dnf install httpd-tools
-
Code Example:
ab -n 1000 -c 10 http://example.com/
-n 1000
: Specifies the total number of requests to perform (1000 in this case).-c 10
: Specifies the concurrency level, meaning 10 concurrent requests will be made.http://example.com/
: The URL to be tested.
-
Advantages: Simplicity, readily available (or easily installed), good for quick and dirty tests.
-
Disadvantages: Lacks some of the advanced features of Siege, such as URL file support and more sophisticated reporting.
2. Locust
-
Explanation: Locust is a Python-based load testing tool that allows you to define user behavior with Python code. This enables you to simulate complex user scenarios and perform more realistic load tests. Locust is highly scalable and supports distributed load generation across multiple machines. It also provides a web-based interface for monitoring test progress and analyzing results in real-time. Locust requires more setup and Python knowledge compared to Siege and
ab
, but it offers much greater flexibility and control. -
Installation on AlmaLinux 9:
sudo dnf install python3-pip pip3 install locust
-
Code Example (locustfile.py):
from locust import HttpUser, task, between class QuickstartUser(HttpUser): wait_time = between(1, 2) host = "http://example.com" @task def hello_world(self): self.client.get("/")
HttpUser
: Defines a user type that interacts with the web server.wait_time
: Specifies the time a user waits between performing tasks.host
: The base URL of the web server being tested.@task
: Decorator that defines a task a user can perform.self.client.get("/")
: Performs an HTTP GET request to the root path.
-
Running the test:
locust -f locustfile.py
This will start the Locust web interface, allowing you to configure the number of users and hatch rate.
-
Advantages: Highly flexible, scalable, realistic user simulation, real-time monitoring.
-
Disadvantages: Requires Python knowledge, more complex setup than Siege or
ab
.
Now, let’s populate the Siege options section based on these alternatives and general use cases for Set up Siege Stress Tester on AlmaLinux 9.
These are some useful options for Siege:
-c <number>
: Specifies the number of concurrent users to simulate. Example:siege -c 25 http://example.com
simulates 25 concurrent users accessing example.com.-t <time>
: Specifies the duration of the test. You can use seconds (S), minutes (M), or hours (H). Example:siege -t 30S http://example.com
runs the test for 30 seconds.-f <file>
: Specifies a file containing a list of URLs to test. Siege will randomly select URLs from the file during the test. Create a fileurls.txt
with URLs and use:siege -f urls.txt
-d <delay>
: Specifies a delay (in seconds) between requests. Example:siege -d 3 http://example.com
adds a 3-second delay between requests from each simulated user.-b
: Runs Siege in benchmark mode, which disables delays and provides more accurate performance measurements.siege -b http://example.com
-i
: Runs Siege in internet simulation mode, which simulates real-world network conditions.siege -i http://example.com
-v
: Verbose output, provides more detailed information during the test run.-g
: Get request.-p
: Post request.siege -p "param1=value1¶m2=value2" http://example.com/submit
Conclusion
Siege remains a useful open-source HTTP/HTTPS load testing and benchmarking utility, perfectly suitable for assessing the performance and stability of web servers under pressure. You have now learned how to Set up Siege Stress Tester on AlmaLinux 9. However, remember that ApacheBench and Locust offer valuable alternatives depending on your specific needs and testing complexity. The best tool for you will depend on the level of detail, realism, and scalability required for your load testing.
Hope you enjoy it. Also, you may be interested in these articles:
Install and Configure Nextcloud on AlmaLinux 9
Siege Benchmark Tool on Debian 12
Stress Test and Benchmark CPU Performance Debian
Stress tests and benchmark CPU performance in Ubuntu
Set up MonoDevelop on Debian 12
Install Siege Stress Test on Ubuntu 20.04
FAQs
How do I perform a basic load test using Siege?
For example, you can perform a simple load test on a specific URL with 10 concurrent users for 1 minute with the command below:siege -c10 -t1M http://example.com
Can Siege test multiple URLs simultaneously?
Yes, Siege can read a list of URLs from a file and test them concurrently.
Is Siege suitable for HTTPS testing?
Yes, Siege supports HTTPS, allowing you to test secure web applications. Ensure that SSL libraries are properly configured on your system to facilitate HTTPS testing.