-
Notifications
You must be signed in to change notification settings - Fork 3k
Lars Holmberg edited this page Oct 3, 2020
·
43 revisions
Add things that you ran into and solved here! Anyone with a GitHub account can contribute!
If you have questions about Locust that are not answered here, please check StackOverflow, or post your question there. This wiki is not for asking questions but for answering them :)
How do I...
See Installation
- Increase the number of users. In order to fully utilize your target system you may need a lot of simultaneous users.
- If response times are unexpectedly high and/or increasing as the number of users go up, then you have probably saturated the system you are testing and need to dig into why. This is not really a Locust problem, but here are some things you may want to check:
- resource utilization (e.g. CPU, memory)
- configuration (e.g. max threads for your web server)
- back end response times (e.g. DB)
- If Locust is complaining about high CPU usage on its side
- Run Locust distributed to utilize multiple cores & multiple machines
- Try switching to FastHttpUser to reduce CPU usage
- If you are using a custom client (not HttpUser or FastHttpUser), make sure any client library you are using is gevent-friendly, otherwise it will block the entire Python process (essentially limiting you to one user per worker)
- Check resource usage on the machine running locust (not just CPU, but also things like network etc)
Call
self.client.cookies.clear()
at the end of your task.
Try using Transformer
Check the list of issues (a lot of questions/misunderstandings are filed as issues)