Am using a node.js loadtest lib to load test one of my sites.
Command when sending a request: loadtest -c 10 --rps 10 -t 30 www.example.com
where -c represents concurrency and --rps requests per second.
Concurrency is described as follows in the docs:
loadtest will create a certain number of clients; this parameter controls how many requests from them will arrive concurrently to the server. Note: requests are not sent in parallel (from different processes), but concurrently (a second request may be sent before the first has been answered).
Does -c 10 --rps 10 mean that a total of 10 connections will be made to the server and each one sending 1 request in a second?
Looking into documentation:
1. >-c-concurrency > >loadtest will create a certain number of clients; this parameter controls how many. Requests from them will arrive concurrently to the server. > >Note: requests are not sent in parallel (from different processes), but concurrently (a second request may be sent before the first has been answered).
Controls the number of requests per second that are sent. Can be fractional, e.g. --rps 0.5 sends one request every two seconds.
Note: Concurrency doesn't affect the final number of requests per second, since rps will be shared by all the clients. E.g.:
loadtest -c 10 --rps 10
will send a total of 10 rps to the given URL, from 10 different clients (each client >will send 1 request per second).
Beware: if concurrency is too low then it is possible that there will not be enough clients to send all of the rps, adjust it with -c if needed.
Note: --rps is not supported for websockets.
So:
-c
stands for concurrent connections (virtual users), for your -c 10
it means that loadtest will use 10 concurrent threads executing requests as fast as they can-rps
stands for "requests per second", if you don't want these 10 users to execute requests as fast as they can - you can limit the number of requests per second to the given value. Remember that using rps
argument you can only pause the threads to limit the requests rate to the desired number, loadtest won't automatically add more threads to reach and maintain the required amount of requests per second so make sure to provide sufficient number of clientsMore information: What is the Relationship Between Users and Hits Per Second?