×



Siege is an open-source benchmarking and load testing tool. Siege can be a valuable tool for analyzing your website's performance and detecting bottlenecks. Its results include a variety of measures that gives you valuable information into the general health of your website. Siege can be used to evaluate website response, transaction rate, throughput, etc. It can stress test a single website or multiple websites simultaneously.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Website Server Monitoring queries.

In this context, we shall look into how to install the Siege benchmarking tool on Ubuntu 20.04 LTS.


Different Methods of Installing Siege benchmarking tool on Ubuntu Linux System 

Siege benchmarking tool can be easily installed via the following ways:

  • Siege Installation via APT.
  • Siege Installation via tar.gz archive.


1. Siege Installation via APT

Here, we will install the Siege Benchmarking tool from the default Ubuntu repository using APT. To do this, follow the steps outlined below.

i. To install Siege on Ubuntu, first update the repository index as follows:

$ sudo apt update

Enter sudo password.

ii. Now install Siege using the command below:

$ sudo apt install siege

If you are prompted with a y/n during installation, type y and hit Enter.

iii. After Siege is installed, you can verify it as follows:

$ siege --version

The output will display the exact version of Siege Installed on the system.


2. Siege Installation via tar.gz archive

Here, we will install the Siege Benchmarking tool using the tar.gz package. So follow the steps outlined below.

i. First install the build-essential package using the command below:

$ sudo apt install build-essential

Enter sudo password. If you are prompted with a y/n during installation, type y and hit Enter.

ii. Download the latest version of Siege tar.gz from this link. You can also use the command below to download Siege Latest version 4.1.0 (as of July 2021):

$ wget http://download.joedog.org/siege/siege-latest.tar.gz

This command will save the Siege tar.gz package to your Home directory.

iii. Move the downloaded package to the /opt directory using the command below:

$ sudo mv siege-latest.tar.gz /opt/

iv. Now move inside the /opt directory:

$ cd /opt/

And extract the Siege archive file:

$ sudo tar -zxf siege-latest.tar.gz

It will be extracted to a directory named siege-version-number (e.g. siege-4.1.0).

v. Move inside the Siege extracted directory:

$ cd siege-4.1.0/

You can use the ls command to view the contents of this directory.

vi. Now run the below command to run the configure script in the Siege directory:

$ sudo ./configure

This command will check for all the dependencies that are required to build and install the package.

vii. Now build the package with the command as follows:

$ sudo make

viii. Then install the package using the command below:

$ sudo make install

Now Siege is installed. You can verify it by running the following command:

$ siege --version


How to Load test Siege on Ubuntu ?

To load test any website using Siege benchmarking tool, use the following syntax:

$ siege options <URL>
The output will produce a number of queries which we explained briefly below:
  • Transactions refers to total number of server hits.
  • Availability is the percentage of connections successfully responded by the server.
  • Elapsed time refers to how long the test ran.
  • Data transferred is the total amount of data Siege used for site testing.
  • Response time is the time took by server for responding the requests.
  • Transaction rate refers to the average number of transactions per second a server can manage.
  • Throughput refers to the number of requests server can serve per second.
  • Concurrency is the number of open parallel connections.
  • Successful & Failed transactions are the number of times the server responded with status code less and greater than 400 respectively.
  • Longest transaction & Shortest transaction are the times that the longest and shortest transaction took to complete out of all transactions respectively.


Furthermore, Siege has various command-line options which you can view using the command below:

$ siege --help


How to Uninstall from Ubuntu Linux ?

If you need to remove Siege from your system, you can do so using the methods below:

1. To remove Siege that was installed using the apt tool, use the command below:

$ sudo apt remove siege

2. To remove Siege that was installed using the tar.gz package, use the commands below:

Navigate to Siege directory:

$ cd siege-4.1.0/

Then uninstall it:

$ sudo make uninstall


[Need to Configure Nginx Web Server for your Websites? We can help you. ]


Conclusion


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com