-
Notifications
You must be signed in to change notification settings - Fork 1
Docs
This is a stress/load testing framework based on NIO (Netty implemention). So it's scalable, doesn't use tons of threads, and is limited only by the speed of the network card.
Main goal is to send as much requests (rps) to remote server as possible. It uses a plain trial and error method: it schedulers maximum number of requests (1M per sec) and decreases it as it gets resource limit errors (connection/port limits etc). Or you can set rps yourself, see cli-format.
Also you can send requests in any form: http or custom tcp. There is a parser of http text files out-of-box.
Requires java 7+
- ensure java 7+ installed
- copy ultimate-stress-x.x.jar to any folder
- create there a text file with http request contents (example) and name it starting with
http
likehttp_my.txt
or so. - run
java -jar ultimate-stress-x.x.jar targethost.com 80
from that folder
It'll send maximum RPS and then decrease when reach limits (if you have OS issues in this case you can set rps manually). Output will be smth like that:
$ java -jar ultimate-stress-0.9.jar targethost.com 80
Starting stress `Client@yourhost` to `targethost.com:80` with 1,000,000 rps (rate=1 micros), full config: {seconds=-1, read.ms=3000, write.ms=3000, exec=1, sample=10000000, print=0, debug=0, server=1, tfactor=1.2, tfactor0=1.1}
STAT: sent= 0, received= 0, connected= 0, rate= 1 | ERRORS: timeouts= 0, binds= 0, connects= 0, io= 0, nn=0
STAT: sent= 6,288, received= 5,672, connected= 8,943, rate= 1 | ERRORS: timeouts= 0, binds= 0, connects= 0, io= 0, nn=0
STAT: sent=10,421, received=10,883, connected=32,592, rate= 1 | ERRORS: timeouts= 0, binds= 0, connects= 0, io= 0, nn=0
ERROR: reached port limit! Decreasing rps: 1,000,000->55,555 (rate: 1->18 micros)
STAT: sent= 8,280, received= 8,425, connected=53,215, rate= 18 | ERRORS: timeouts= 0, binds= 10, connects= 0, io= 0, nn=0
If you don't have a remote server right now, you can stress test your localhost performance =) there is a server option, which starts a server locally, e.g. java -Dserver=1 -jar ultimate-stress-x.x.jar localhost 80
All command line options are here.
You can have multiple http text files like (http_r1.txt). Their contents will be cached in memory and send on each request one after another cyclically.
It's a standard maven project, you can build all stuff as mvn clean install
from the root folder.
You can write your own implementation of RequestSource interface (single method) and pass it to StressClient constructor for sending your custom requests in any tcp form.