Siege: Measure the performance of your web server

Just 2 weeks ago I told them on how to measure your web server performance with Apache Benchmark, and then graph it with GNUPlot.

This time I'll tell you about an alternative to Apache Benchmark, I'll tell you about: Siege

NetStat to prevent DDoS attacks

What is Siege and how to install it?

With Siege we simulate accesses to a website, that is, we indicate the final number of requests that must be made to a specific site, how many concurrent, if we want you to visit a specific URL or a set of them, etc. At the end we obtain an output that will tell us how long it took our web server to attend to all requests, etc. In the end, it is data that helps us to know if the optimization tasks that we may be doing are effective or not.

To install Siege, simply install the package of the same name in our distro, in Debian, Ubuntu or similar it would be:

sudo apt-get install siege

In ArchLinux or derivatives it would be:

sudo pacman -S siege

How to use Siege?

As with Apache Benchmark, with one parameter we pass all the requests it will make and with another we indicate the number of simultaneous requests:

siege --concurrent=50 --reps=100 http://www.misitio.com

According to this example, we will make a total of 100 requests, 50 concurrent.

The output would be something like this:

seat

This only made requests to the site's index, the most important thing to consider is the response times.

The same if we create a file (urls.txt for example) and in it we put several URLs of the same site, then with siege we use the following line to visit those URLs and measure the performance, this is a more real or possible practice, since no human visits 100 times the index of a site in a row 🙂

siege --concurrent=50 --reps=100 -f urls.txt

End

So far I have not been able to graph the result with GNUPlot (as I did with Apache Benchmark), it is a task that I still have in ToDo 😉


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Pepe Barrascout Ortiz said

    I have a question, as you have mentioned, normally a single person will not visit the same url 100 or x times in a row in such a short period of time, so this could not be considered as a DDoS attack and that the same server blocks us? , assuming of course that we have a minimum security installed.

    Best regards.

  2.   llaalall said

    I liked it, more of this