Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set --max-workers required in parameters + tip performance #127

Open
rodrigoslayertech opened this issue Dec 9, 2022 · 0 comments
Open

Comments

@rodrigoslayertech
Copy link

rodrigoslayertech commented Dec 9, 2022

Hello!

DefaultMaxWorkers = math.MaxUint64

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:

  1. 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..
  2. 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).

@rodrigoslayertech rodrigoslayertech changed the title Set max-works required in parameters + tip performance Set max-workers required in parameters + tip performance Dec 9, 2022
@rodrigoslayertech rodrigoslayertech changed the title Set max-workers required in parameters + tip performance Set --max-workers required in parameters + tip performance Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant