I need to perform 3 types of performance tests for apache.
I went through httperf manual but, I am really confused with various options like, --rate , --num-call , --num-conn , --wsess
could anyone help me for following:
How to specify duration and how to configure --rate , --num-conn and --num-calls so test will execute for specified duration and with specified number of requests/sec?
I'd do something like this:
httperf --hog --server www.google.com --uri "/" --num-conn 30000 --num-call 1 \
--timeout 5 --rate 500 --port 80
httperf --hog --server www.google.com --uri "/" --num-conn 60000 --num-call 1 \
--timeout 5 --rate 1000 --port 80
httperf --hog --server www.google.com --uri "/" --num-conn 75000 --num-call 1 \
--timeout 5 --rate 1500 --port 80
NOTE1: The --rate
specifies the fixed rate at which connections/sessions are to be created.
NOTE2: The --num-conn
specifies the total number of connections to create. Therefore if you're creating X req/sec you need to do X * 60 secs, in order to specify the length of time.
This last point was the hardest thing to figure out with httperf. The length of time is a function of the rate & the number of connections, you don't specify it.
So for your example:
500 req/sec @ 60 sec duration = 500 * 60 = 30,000 connections
1000 req/sec @ 60 sec duration = 1000 * 60 = 60,000 connections
1500 req/sec @ 60 sec duration = 1500 * 60 = 90,000 connections
See the man page for further details on httperf.
--rate=X Specifies the fixed rate at which connections or sessions are created.
Connections are created by default, sessions if option --wsess or
--wsesslog has been specified. In both cases a rate of 0 results
in connections or sessions being generated sequentially (a new
session/connection is initiated as soon as the previous one
completes). The default value for this option is 0.
--num-conn=N This option is meaningful for request-oriented workloads only. It
specifies the total number of connections to create. On each
connection, calls are issued as specified by options --num-calls
and --burst-length. A test stops as soon as the N connections have
either completed or failed. A connection is considered to have
failed if any activity on the connection fails to make forward
progress for more than the time specified by the timeout options
--timeout and --think-time‐out. The default value for this option is 1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With