Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

stress test your web server with httperf

Rumi, November 13, 2017

Httperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance.

NOTE : for accurate results, it’s best to run httperf from a remote machine and not from the localhost

to install httperf in red-hat based distributions (additional repo are needed. For centos you’ll need rpmforge, see here for installation)

yum install httperf

or in debian based

apt-get install httperf

An example of httperf stress test

 httperf --server www.somedomain.com --uri /index.php --num-conn 20 --num-cal 10 --rate 2 --timeout 5

–server specifies the name or ip of the machine the service is running.
–uri specifies the context path of the service on the server.
–num-conn 20 instructs httperf to make 20 connections.
–num-cal 10 instructs httperf to issue 10 requests per connection.
–rate 2 specifies how many new connections are made every second, 2 in our case.
–timeout 5 instructs httperf to report as errors any requests that aren’t answered within 5 seconds.

So with the above command we’ll open 20 connections (with a rate of 2 connections per second) to http://www.somedomain.com/index.php with 10 requests per connection. Any requests that aren’t answered by the web server within 5 seconds will be marked as error.

Of course you should set different options for a static .html page against a cms like joomla,wordpress, drupal etc. Different options should also be used for a vps against a dedicated server.

I would suggest to start testing with something that your web server could handle easily and start raising values afterwards. Setting too high options from the beginning might cause high load to your server and make it unresponsive.

For further customization you should visit the man page of httperf.

An example of the results :

[root@server ~]# httperf --server www.somedomain.com --uri / --num-conn 20 --num-cal 10 --rate 2 --timeout 5
httperf --timeout=5 --client=0/1 --server=www.somedomaincom --port=80 --uri=/ --rate=2 --send-buffer=4096 --recv-buffer=16384 --num-conns=20 --num-calls=10
Maximum connect burst length: 1

Total: connections 20 requests 200 replies 200 test-duration 10.542 s

Connection rate: 1.9 conn/s (527.1 ms/conn, <=3 concurrent connections)
Connection time [ms]: min 1017.6 avg 1055.9 max 1181.1 median 1033.5 stddev 47.2
Connection time [ms]: connect 70.9
Connection length [replies/conn]: 10.000

Request rate: 19.0 req/s (52.7 ms/req)
Request size [B]: 63.0

Reply rate [replies/s]: min 18.4 avg 19.2 max 20.0 stddev 1.1 (2 samples)
Reply time [ms]: response 73.6 transfer 24.9
Reply size [B]: header 296.0 content 12374.0 footer 0.0 (total 12670.0)
Reply status: 1xx=0 2xx=200 3xx=0 4xx=0 5xx=0

CPU time [s]: user 1.86 system 8.30 (user 17.7% system 78.7% total 96.4%)
Net I/O: 235.9 KB/s (1.9*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

Src: http://www.akamaras.com/linux/stress-test-your-web-server-with-httperf/

Administrations Configurations (Linux) CentOSDebianhttprefStress Test

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

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

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx openvpn pfsense php Postfix Proxmox RDP Softether SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin Windows 10 XCP-NG zimbra

Topics

Recent Posts

  • CovermyAss February 27, 2026
  • KVM Cloud Capacity Planning Script (Enhanced) February 20, 2026
  • Youtube MP3 Downloader Script using AI February 14, 2026
  • Install Softether VPN and create a Destination NAT (D-NAT) Rule to access the private Client VPN Node on a Debian 12 OS February 14, 2026
  • Deploying Pulse Monitoring for Proxmox Cluster Ecosystem February 13, 2026
  • Technitium DNS Web UI Configuration for Primary-Secondary Name Servers February 12, 2026
  • Technitium DNS with Primary-Slave Installation on Debian February 12, 2026
  • Install Docker and Docker Compose in Debian 12 February 5, 2026
  • Install GUI on Debian 12 using CLI February 4, 2026
  • Configuring Multiple PHP Versions on Virtualmin January 30, 2026

Archives

Top Posts & Pages

  • CovermyAss
©2026 Bots! | WordPress Theme by SuperbThemes