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

Limitations #288

Merged
merged 3 commits into from
Oct 19, 2020
Merged

Limitations #288

merged 3 commits into from
Oct 19, 2020

Conversation

mcollina
Copy link
Owner

Explain a bit more the implied limitations of autocannon.

applicatiions using the `http` module.
Nevertheless, it uses significant more CPU than other tools that compiles to a binary such as `wrk`.
Autocannon can saturate the CPU, e.g. the autocannon process reaches 100%: in those cases
we recommend to use `wrk`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In saturation cases, I've also run autocannon from an adjacent machine. You've got to account for network latency but once you do the perf analysis still works.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it can still happen that autocannon saturates the CPU.

Let's make an example with 1000 connections on my dedicated server with 4 cores with hyperthreading:

  • wrk uses 2 threads + an auxiliary one to collect data: 20% + 20% + 40% cpu load.
  • autocannon uses one thread at 80% cpu load.

Both saturates a Node.js process at around 41k req/sec, however wrk could potentially create more load due to its multi threading nature (because the server has plenty of CPU power available).

(I will include this example)


The solution is to use piscina and run workers!

@mcollina mcollina merged commit c51c6d8 into master Oct 19, 2020
@mcollina mcollina deleted the limitations branch October 19, 2020 15:02
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

Successfully merging this pull request may close these issues.

2 participants