15 C
Jaipur
Monday, November 23, 2020

How to Install and Use Siege Benchmarking Tool on Ubuntu 20.04

Must read

Google launches AI platform to help cities plant more trees – Latest News

As policy makers aim to plant more trees to increase shade on warming city streets globally, Google has launched Tree Canopy Lab that combines...

IEEE: Artificial Intelligence, Machine Learning, 5G and IoT will be most important tech in 2021 – Latest News

Artificial intelligence (AI), machine learning, 5G and Internet of Things (IoT) would be the most important technologies in 2021, according to a new study...

IT Minister launches international version of UMANG app – Latest News

The international version of the UMANG app was launched on Monday for select countries, including the US, UK, Canada, Australia, UAE, Netherlands, Singapore, Australia...

How to create a Cloudwatch Event Rule in AWS

A near-real-time stream of system events that describe changes in AWS resources is delivered by CloudWatch Events. We can create a rule that matches...

Siege is an open-source multi-threaded load testing and benchmarking tool for Linux. You can perform a stress test using a single URL with a specific number of users or you can put all URLs in files and. stress them simultaneously. It also allows you to test a web server with n number of users t number of times. Siege offers three modes of operation: Regression, internet simulation, and brute force.

In this tutorial, we will explain how to install Siege Benchmarking Tool on Ubuntu 20.04.

Prerequisites

  • A server running Ubuntu 20.04.
  • A root password is configured the server.

Getting Started

Before starting, update your system packages to the latest version. You can update them using the following command:

apt-get update -y

Once all the packages are updated, you can proceed to the next step.

Install Siege

By default, Siege is available in the Ubuntu 20.04 default repository. You can install it by just running the following command:

apt-get install siege -y

Once the Siege is installed, you can verify the installed version of Siege using the following command:

siege --version

You should see the following output:

SIEGE 4.0.4

Copyright (C) 2017 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

Configure Siege

The default Siege configuration file is located at /etc/siege/siegerc. You will need to edit this configuration file and define your log file:

nano /etc/siege/siegerc

Uncomment the following line:

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

Save and close the file when you are finished.

Test a Single Website with Siege

You can use siege command by specifying any website to test the load as shown below:

siege test.example.com

You should see the following output:

Transactions:		       57832 hits
Availability:		       99.95 %
Elapsed time:		      401.49 secs
Data transferred:	      706.55 MB
Response time:		        0.17 secs
Transaction rate:	      144.04 trans/sec
Throughput:		        1.76 MB/sec
Concurrency:		       24.35
Successful transactions:       57852
Failed transactions:	          31
Longest transaction:	      100.01
Shortest transaction:	        0.00

Test Multiple Website with Siege

You can also test multiple websites by adding your website URLs in the file /etc/siege/urls.txt.

nano /etc/siege/urls.txt

Add your desired URLs as shown below:

http://example1.com
www.example.com
192.168.0.2

Save and close the file when you are finished. Then, run the siege command by specifying your URL file as shown below:

siege -f /etc/siege/urls.txt

This will perform a stress test by reading all URLs one by one from the /etc/siege/urls.txt file.

Siege comes with a lot of options. A brief explanation of each is shown below:

  • -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 help information.
  • -l : It is used to generate a log file.

Conclusion

In the above article, you learned how to install Siege to benchmark your website performance. You can now use all options one by one with Siege and test the result.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Google launches AI platform to help cities plant more trees – Latest News

As policy makers aim to plant more trees to increase shade on warming city streets globally, Google has launched Tree Canopy Lab that combines...

IEEE: Artificial Intelligence, Machine Learning, 5G and IoT will be most important tech in 2021 – Latest News

Artificial intelligence (AI), machine learning, 5G and Internet of Things (IoT) would be the most important technologies in 2021, according to a new study...

IT Minister launches international version of UMANG app – Latest News

The international version of the UMANG app was launched on Monday for select countries, including the US, UK, Canada, Australia, UAE, Netherlands, Singapore, Australia...

How to create a Cloudwatch Event Rule in AWS

A near-real-time stream of system events that describe changes in AWS resources is delivered by CloudWatch Events. We can create a rule that matches...

Oppo’s futuristic smartphone with rollable display will not be for sale

Oppo recently amazed smartphone enthusiasts worldwide by showcasing the X 2021 handset with a rollable display. The device expands...