Set --max-workers required in parameters + tip performance
rodrigoslayertech opened this issue · 0 comments
Hello!
Line 25 in e3f49a4
After performing several tests, I found that if this parameter "--max-workers" is not passed, there is some severe performance penalty.
How I discovered the performance issue:
Without passing the "-W" as a parameter and benchmarking a powerful web server on my own local machine, I gradually increased the requests per second until I was limited to around 10k req/s due to performance issues:
Ali crashed and the graphs showed that my server's latency was only going up! However... On the other hand the "wrk" tool was handling more than 80k req/s so the problem was not in my web server.
I decided start the ali benchmark again by setting the "-W" to 10 and gradually increased both the rate
(-r) and the max-workers
until I understood that on my machine the maximum request that each worker could handle was around 1000 req / worker.
So I tested it and in every time that I didn't set the max-workers
the benchmark crashed after 10k/sec and in every time that I set the max-workers
ali ran smoothly.
Then, using the command:
ali -r 25000 -d 15s -W 25 http://localhost:8080/
The 10k/sec bottleneck was avoided until reaching the intended 25k/sec in the command.
The tip performance then is:
- Never run ali without defining the
-W
param and gradually increase the max number of workers so you can understand the rate of requests / worker needed to reach the rate you want and avoid this bug.. - To max performance set
--redraw-interval
1000ms too.
For the dev team:
Set max-workers
as required in params or min 10 max-workers and max -> if rate > 1000 then max-workers = rate / 1000 (rounded).