Install Siege Stress Test on Ubuntu 20.04: Best HTTP Load Testing

In this guide, you will learn to Install Siege Stress Test on Ubuntu 20.04. Siege is an HTTP load testing tool that you can use to send hundreds of concurrent visitors to your website at once to check how it will perform under pressure and how much availability your server can provide.

Siege is a very easy-to-use and beginner-friendly tool. It just takes a few commands to install Siege on the Ubuntu server and a single command to start testing the performance of your application. In benchmark mode, it runs as fast as possible with no delays.

Now follow the steps below on the Orcacore website to Install Siege Stress Test on Ubuntu 20.04.

Steps To Install Siege Stress Test on Ubuntu 20.04

To use Siege HTTP load testing on Ubuntu 20.04, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Ubuntu 20.04.

Install Siege HTTP Load Testing on Ubuntu 20.04

First, you need to update and upgrade your local package index with the command below:

# sudo apt update 
# sudo apt upgrade

Siege is available in the default Ubuntu repository. So you can install Siege with the following command:

sudo apt install siege -y

Then, you can verify your Siege installation on Ubuntu 20.04 by checking its version:

siege --version
Siege HTTP Load testing

Configure Siege on Ubuntu 20.04

At this point, you need to make some configuration changes to the Siege config file. The main option you will need to change is the log path.

Open the file with your favorite text editor, here we use the vi editor:

sudo vi /etc/siege/siegerc

Now find the line below and uncomment it by removing the # from the beginning of the line:

 logfile = $(HOME)/var/log/siege.log

When you are done, save and close the file.

At this point, you can see some useful options for Siege on Ubuntu 20.04:

  • -t: This option is used to set a time limit for which Siege runs.
  • -c: This option is used to set the number of concurrent users.
  • -d: This option is used to set the delay time for each user.
  • -C: This option is used to specify your own configuration file.
  • -i: It is used to hit random URLs.
  • -T: It is used to set the Content-Type in requests.
  • -h: It is used to display helpful information.
  • -l: It is used to generate a log file.

How To Use Siege Stress Teste

At this point, you can test your web server with Siege on Ubuntu 20.04, do note this will pretty much look like a DDOS attack on some firewalls and WAF, so make sure to have permission before using any HTTP benchmarking tool. Ideally, it would be best not to use this except for your servers.

First, you can use the siege command and test the default amongst workers, which is 25 for one minute, by specifying -t 1m as shown below:

siege https://www.example.com -t 1m

Also, another variable you may want to include is the number of workers, for example -c 100 will add 100 workers.

siege https://www.example.com -c 100 -t 2m

Manage Multiple domains with Siege

Another feature of Siege is to manage multiple domains on Ubuntu 20.04. First, open the following file with your favorite text editor, here we use vi:

sudo vi /etc/siege/urls.txt

Next, add the URLs you want to be benchmark tested:

https://www.example.com
https://www.example2.com
http://192.168.50.1

When you are done, save and close the file.

To execute the multiple website stress test run the following command:

siege -f /etc/siege/urls.txt

Run Siege Benchmark

To run Siege in benchmark mode, you can use the -b flag and pass the URL you’d like to benchmark. By default, it will run with 25 threads.

siege -b http://www.example.com:5000/benchmark

Conclusion

Siege is a tool for testing the performance of websites or web servers. It simulates many users visiting the site at the same time to check how fast it responds and how much traffic it can handle. At this point, you have learned to Install and Use Siege Stress Test on Ubuntu 20.04.

Hope you enjoy it. Also, you may like to read the following articles:

Install Xfce / Xubuntu desktop on Ubuntu 20.04 Focal Fossa

How to install a specific version of PostgreSQL in Ubuntu?

Get MariaDB 10.11 For Ubuntu 20.04

How to upgrade kernel version in Ubuntu 20.04?

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!