Open-Source performance testing tools
These tools allow you to load test your application for free. My preferred tool is Bees with Machine Guns — not just because of the epic name, but primarily because it uses Amazon’s EC2 to generate high levels of concurrency with ease.
- Bees with Machine Guns – A utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications).
- MultiMechanize – Multi-Mechanize is an open source framework for performance and load testing. It runs concurrent Python scripts to generate load (synthetic transactions) against a remote site or service. Multi-Mechanize is most commonly used for web performance and scalability testing, but can be used to generate workload against any remote API accessible from Python.
- Siege – Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server “under siege.”
- HttpPerf – Httperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance. The focus of httperf is not on implementing one particular benchmark but on providing a robust, high-performance tool that facilitates the construction of both micro- and macro-level benchmarks. The three distinguishing characteristics of httpperf are its robustness, which includes the ability to generate and sustain server overload, support for the HTTP/1.1 and SSL protocols, and its extensibility to new workload generators and performance measurements.
- Apache Bench – AB is a tool for benchmarking your Apache HTTP server. It is designed to give you an impression of how Apache performs.
- JMeter – Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, databases and queries, FTP servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.
# siege http://mywebserver.com/ -b -c 100 -v -t 60s
Options:
-b : –benchmark : no delays between requests
-c : –concurrent : Number of concurrent users
-v : –verbose
-t : –time : time for testing
# ab -n 1000 -c 100 http://mywebserver.com/index.html
Options:
-n1000: ab will send 1000 number of requests to server mywebserver.com in order to perform for the benchmarking session
-c : –concurrent : Number of concurrent users
-k : –keepalive
# wget http://pkgs.repoforge.org/httperf/httperf-0.9.0-1.el6.rf.x86_64.rpm; rpm -ivh httperf-0.9.0-1.el6.rf.x86_64.rpm
# httperf --server www.mywebserver.com --uri /index.html --num-con 20 --num-cal 10 --rate 2 --timeout 5
Options:
–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.
-hog: This will try to use as many TCP connection as possible from host machine.
Proxy Example:
# httperf --server 127.0.0.1 \
--port 8118 \
--uri=http://www.mywebserver.com/page.html \
--no-host-hdr \
--add-header "Host: www.mywebserver.com"
Autobench Example:
autobench --single_host --host1 www.mywebserver.com --port1 80 --uri1 /page.html --quiet \
--low_rate 20 --high_rate 200 --rate_step 20 --num_call 10 \
--num_conn 5000 --timeout 5 --output_fmt csv --file results.csv
See also:
abc with weighttp
http://gwan.com/en_apachebench_httperf.html
https://gist.github.com/tanaka-takayoshi/d58fe328e0a151de7611
500,000 RPS using wrk with nginx:
https://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast/
Update 19/6/15 - Universal load testing tool Tsung, wrk:
http://tsung.erlang-projects.org/
https://github.com/wg/wrk
https://www.digitalocean.com/community/tutorials/how-to-benchmark-http-latency-with-wrk-on-ubuntu-14-04
https://gist.github.com/denji/8359866
No comments:
Post a Comment