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

Locust should warn if CPU usage is too high #1161

Closed
cyberw opened this issue Nov 19, 2019 · 2 comments
Closed

Locust should warn if CPU usage is too high #1161

cyberw opened this issue Nov 19, 2019 · 2 comments

Comments

@cyberw
Copy link
Collaborator

cyberw commented Nov 19, 2019

If locust runs out of CPU, that may limit the number of requests sent and impact the measurement of response times.

Using psutil we can detect high CPU usage and warn the user (in the web gui and on command line) if CPU usage exceeds a certain threshold (and suggest that the user run multiple processes or examine their test plan).

I suggest we warn if CPU exceeds 90% over a 10 second timespan.

On the command line we can warn only twice: when the threshold was exceeded and at the end of the test.

In web gui we could have two different indicators: "currently above threshold" and "threshold was exceeded at some point during the test".

But we can build a command line-only version first.

@heyman
Copy link
Member

heyman commented Nov 19, 2019

I think it's a good idea!

In web gui we could have two different indicators: "currently above threshold" and "threshold was exceeded at some point during the test".

I think it's better to just output the usage number somewhere, and then the usage number for each slave node in "Slaves" tab. We could make it red (or highlight it in some other way) if it exceeds some threshold.

@heyman
Copy link
Member

heyman commented Nov 19, 2019

We should also consider doing this for memory usage as well.

@cyberw cyberw closed this as completed in a8d3386 Jan 22, 2020
cyberw added a commit that referenced this issue Jan 22, 2020
…s-too-high

Warn if CPU usage is too high (>90%) #1161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants