Let’s take an example of running a test for 5 minutes with 500 concurrent users with 8 threads. With wrk, you can specify to run a load test with a number of threads. Wrk is another modern performance measurement tool to put a load on your web server and give you latency, request per second, transfer per second, etc. You must give a try to JMeter if your goal is to optimize the web application performance. JMeter got decent friendly GUI, and the latest version 3.0 require Java 7 or higher to launch the application. JMeter is java based application and not only a web server, but you can use it against PHP, Java. JMeter is one of the most popular open-source tools to measure web application performance. It supports more than 20,000 concurrent users which ApacheBench doesn’t. Gobench is written in Go language and simple load testing utility to benchmark the web server performance. The report is interactive and gives detailed latency information. I did a quick test on Geekflare Tools and here is the output looks like. Ryo Nakao you can see above, you have an option to send HTTP headers, test duration, rate limit, timeout, and more. t, -timeout duration The timeout for each request. Give 0 then it will send requests as fast as possible. r, -rate int The request rate per second to issue against the targets. m, -method string An HTTP request method for each request. M, -max-body int Max bytes to capture from response bodies. k, -keepalive Use persistent connections. Can be used multiple times to send multiple headers. H, -header strings A request header to be sent. d, -duration duration The amount of time to issue requests to the targets. B, -body-file string The path to file whose content will be set as the http request body. b, -body string A request body to be sent. Once installed, execute ali to see the usage details. It supports multiple platforms to install, including Docker. AliĪli is a relatively new load testing tool to perform real-time analysis. You can tweak the load test parameter based on your goal. So as you can see, the availability is 100% and the response time is 0.04 seconds. q – to run it quietly (not showing request details) ~]# siege -q -t 5S -c 500 Lifting the server siege. Let’s run the test with 500 concurrent requests for 5 seconds. You can put multiple URL’s in a text file to load tests against. SIEGE is an HTTP load test utility supported on UNIX. You can try multiple combinations of OS & Web Server version for the optimal results.ĭon’t like ApacheBench for whatever reason? No worries, there are plenty of others you can use to perform HTTP load. So you see just comparing with two web servers you will get an idea which one to choose for your web application. Nginx handled 6593 requests per second! A winner. Time per request: 0.152 (mean, across all concurrent requests) ~]# ab -n 5000 -c 500 This is ApacheBench, Version 2.3 Let’s make the test what we did for Apache so you can compare which one performs better. Now you know the default configuration can serve these many requests so when you make any configuration changes you can do the test again to compare the results and choose the best one. So as you can see, Apache has handled 373 requests per second, and it took a total of 13.389 seconds to serve the total requests. Percentage of the requests served within a certain time (ms) Time per request: 2.678 (mean, across all concurrent requests) Licensed to The Apache Software Foundation, ~]# ab -n 5000 -c 500 This is ApacheBench, Version 2.3 Ĭopyright 1996 Adam Twiss, Zeus Technology Ltd, Now, let’s see how it performs for 5000 requests with a concurrency of 500. If you already have httpd-tools, then you may ignore this. Let’s get ApacheBench installed by using a yum command. In this post, I will explain how to install this small program and perform the load test to benchmark the results. ApacheBenchĪpacheBench (ab) is an open-source command-line program that works with any web server. I’ve used Apache & Nginx web server hosted on DigitalOcean to test it. There are several online tools to perform a stress test however, if you are looking for an in-house solution or want to benchmark just the webserver performance, then you can use ApacheBench and alternatively some of the below-listed tools. When your site will perform slower or breakdown.Which configuration gives you the best results.Number of servers you need to serve x number of requests. If you are to choose the webserver, then one of the first things you want to do is perform the load testing and see which one works well for you. Load testing is essential for web applications to know website capacity. Do you know your website’s average response time? Do you know how many concurrent users your site can handle?
0 Comments
Leave a Reply. |