-
Notifications
You must be signed in to change notification settings - Fork 3k
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 docker version 1.4.0 using 100% CPU on idle #1629
Comments
What is consuming the CPU? |
Maybe "caused" by #1626? |
Since Locust 1.4, the default wait time for simulated locust users is zero. Therefore I recommend that you specify a wait time for from locust import HttpUser, task, between
class QuickstartUser(HttpUser):
# wait between 1 and 5 seconds between tasks
wait_time = between(1, 5)
... |
If this is the recommended way, example files should be also updated accordingly. |
I agree. |
Hi The same result comes with or without wait_time parameter Following example locustfile also uses 100% CPU
Command locust is using 100% CPU inside the Docker container |
I cant reproduce 100% cpu usage on any of the suggested test plans. Do you mean 100% cpu on the load gen or on the server, or are you running them both on the same machine? Is it possible that it is somehow related to the keyboard input, which was also introduced in 1.4? |
@eskallberg are you also on Ubuntu? |
Yes |
@simakuutio Btw, when you say "idle CPU load" what do you mean exactly? I guess you mean "while running load", but that is kind of the opposite of "idle", so I just want to be sure? |
That's what I thought as well. I can reproduce the issue with just a few number of simulated users for the original example when running against a HTTP server that can handle the load. I haven't been able to reproduce it when the test isn't running. About to test @eskallberg 's example in Docker container now. |
I can reproduce this in docker/Ubuntu and it also prints the following exception when shutting down. I'm 99% confident this is an issue with keyboard input (on Ubuntu, not MacOS, CentOS or Windows), not with wait times. I will check with @DennisKrone if he can fix it.
|
Aha, the problem is that when running docker, there is no interactive terminal. Add |
I will try that and let you know how it goes with -it About the idle, no heavy test running, just the container up. |
with -it it works fine. |
Nice find! The #1630 should fix it. |
Fixed in #1631 |
I have a similar issue when running locust on EC2 instances (t3.medium) in a distributed mode. For example 1 master 4 worker nodes. With a simple load testing with 20 users for example after some point all worker nodes hit 100% CPU. The tasks I'm running and the payload being passed to the tasks are pretty simple and no such load is expected with 20 users. Sorry if this has been reported anywhere else I just wanted to follow up on this. We've also added the |
Test environment:
Ubuntu 18.04.1
Docker version 19.03.6
Environment stays the same only the docker image version is changed.
Running the docker container with the same locustifle.py which is an example from https://hub.docker.com/r/locustio/locust
When running locustio/locust version 1.3.2 the idle CPU load is around 0.0% and stable.
Running locustio/locust version 1.4.0 the idle CPU load goes up to 100.0% at once when the container is started and stays between 96.7% and 100.0%.
The text was updated successfully, but these errors were encountered: