WebBench: An Nginx Stress Testing Tool

Apache comes with the ab command for stress testing services, but Nginx does not have a built-in tool. You must use third-party software for this purpose. Today, let’s briefly introduce how to use webbench for Nginx stress testing. Stress testing is essential for system administrators and operations personnel, as it clearly reveals how much load a server can handle. Note: The tests here were performed on a virtual machine.

1. Download and Install webbench

wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz

tar xvf webbench-1.5.tar.gz -C /usr/local/

cd /usr/local/webbench-1.5/

make

make install

2. Command Details

[root@CentOS179min webbench-1.5]# ./webbench -help

webbench [option]… URL

-f|–force Don’t wait for reply from server.

-r|–reload Send reload request – Pragma: no-cache.

-t|–time Run benchmark for seconds. Default 30.

-p|–proxy Use proxy server for request.

-c|–clients Run HTTP clients at once. Default one.

-9|–http09 Use HTTP/0.9 style requests.

-1|–http10 Use HTTP/1.0 protocol.

-2|–http11 Use HTTP/1.1 protocol.

–get Use GET request method.

–head Use HEAD request method.

–options Use OPTIONS request method.

–trace Use TRACE request method.

-?|-h|–help This information.

-V|–version Display program version.

[root@centos179min webbench-1.5]#

3. Test Website Stress

[root@centos179min webbench-1.5]# ./webbench -c 200 -t 10 http://192.168.1.179/test.php

Webbench – Simple Web Benchmark 1.5

Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://192.168.1.179/test.php 200 clients, running 10 sec.

Speed=58386 pages/min, 51328516 bytes/sec. –Requests per second: Speed=58386 pages/min, Data transferred per second: 51328516 bytes/sec

Requests: 9731 susceed, 0 failed. –10 seconds, 200 concurrent clients, no failures

[root@centos179min webbench-1.5]# ./webbench -c 1000 -t 10 http://192.168.1.179/test.php

Webbench – Simple Web Benchmark 1.5

Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://192.168.1.179/test.php 1000 clients, running 10 sec.

Speed=47916 pages/min, 42126676 bytes/sec.

Requests: 7986 susceed, 0 failed.                 

–10 seconds, 1000 concurrent clients, also no failures

[root@centos179min webbench-1.5]# ./webbench -c 2000 -t 10 http://192.168.1.179/test.php

Webbench – Simple Web Benchmark 1.5

Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://192.168.1.179/test.php 2000 clients, running 10 sec.

Speed=50394 pages/min, 44303164 bytes/sec.

Requests: 8399 susceed, 0 failed.                   

–Sending 2000 requests within 10 seconds, also no failures

[root@centos179min webbench-1.5]# ./webbench -c 4000 -t 10 http://192.168.1.179/test.php

Webbench – Simple Web Benchmark 1.5

Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://192.168.1.179/test.php 4000 clients, running 10 sec.

Speed=46644 pages/min, 40894852 bytes/sec.

Requests: 7749 susceed, 25 failed.             

–With 4000 concurrent clients within 10 seconds, 25 requests failed, proving that the concurrency limit within 10 seconds is under 4000. Note: nginx was not optimized.

 

[root@centos179min webbench-1.5]#

WebBench Installation and Testing http://www.linuxidc.com/Linux/2013-04/83586.htm

Testing Website Load with WebBench http://www.linuxidc.com/Linux/2013-03/80612.htm

Website Stress Testing Tool WebBench http://www.linuxidc.com/Linux/2013-01/77510.htm

Installing and Using the Server Stress Testing Tool WebBenchhttp://www.linuxidc.com/Linux/2012-08/69400.htm

Download, Install, and Use the Linux Website Stress Testing Tool WebBenchhttp://www.linuxidc.com/Linux/2011-02/31995.htm

Two Concurrency Testing Tools in Linux: ab & WebBench http://www.linuxidc.com/Linux/2011-01/31392.htm

Building a Web Server with Nginx http://www.linuxidc.com/Linux/2013-09/89768.htm

Complete Guide to Building a Web Server on Linux 6.3 + Nginx 1.2 + PHP 5 + MySQL 5.5http://www.linuxidc.com/Linux/2013-09/89692.htm

Nginx Detailed Introduction : Click Here

Nginx Download Address : Click Here

Permanent Update Link for This Article : http://www.linuxidc.com/Linux/2014-10/107611.htm

Leave a Comment

Your email address will not be published.