The locust python instance can use max 1 cpu core on macOS
See original GitHub issueDescribe the bug
I have a simple locust file which hit an json rest endpoint. I start the load with 50 user with hatch rate 25. Then I try to keep adding users in the next run. No matter how many user I specify in the command, I can see that the CPU is only top at 100%CPU cores on my mac with 16CPU cores.
Expected behavior
I expect it to take more CPU and ram when the load is increasing.
Actual behavior
CPU only top at 1 full core never beyond that.
Steps to reproduce
run the locust command below with the python script at the same folder.
versions of python and locust
dev01:~$ locust --version
locust 1.1.1
dev01:~$ python3 -V
Python 3.8.4
dev01:~$ python -V
Python 2.7.16
Environment
-
OS: MacOS 10.15.6
-
Python version: 3.8.4
-
Locust version: 1.1.1
-
Locust command line that you ran: locust -f class-test-random-site-12month.py --host=https://report.dev.int --headless -u 500 -r 100 -t 3m --csv=result-12mon
-
Locust file contents (anonymized if necessary):
import random
from locust import HttpUser, task, between
from locust.contrib.fasthttp import FastHttpUser
class QuickstartUser(HttpUser):
wait_time = between(0, 0)
@task
def article_12mon(self):
# top 20 stores in test data
storeList = [7041,7011,7013,7047,7042, 7043, 7063]
# top departments excluding seasonal/garden
deptList = [27, 24, 59, 29, 25, 23]
storeId = str(random.choice(storeList))
deptId = str(random.choice(deptList))
self.client.get("/dashboard/store/" + storeId + "/departments/" + deptId + "/classes?filterSelection=12MON", name="class-test - store: " + storeId + " - dept: " + deptId)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
That link is broken
https://docs.locust.io/en/stable/running-distributed.html