11
  1. Are there limits to the number of users locust.io can support in a "swarm"?
  2. Where is the documentation on distributed load testing for locust.io?

We would like to load test our site with 50-100k concurrent users, and I see locust can support thousands of users on one machine, but we would like to increase it. How can we setup locust on multiple machines to run the same test? Seems to hint to it on the README and documentation.

The master slave documentation can be found here:

http://docs.locust.io/en/latest/api.html?highlight=master

Sheena
  • 15,590
  • 14
  • 75
  • 113
Jonathan Reyes
  • 1,387
  • 1
  • 10
  • 23

1 Answers1

24
  1. In theory, yes. Due to the master/slave setup Locust uses you will be limited to what the master can process. However, we haven't seen any issues with that when load testing Battlelog (the online service for the Battlefield game series). For Battlefield 3, we simulated over 2 million concurrent users without problems. Exactly how many slave machines you need is hard to say since it depends on what they do and how idle / how much wait time you are planning.

  2. You will need to setup machines running Locust slaves and have them connect to the master. A common setup is to run the master on one machine then run one slave process per CPU core on each slave machine. Using a cloud provider where you pay by the hour is highly recommended when doing large scale tests. We use AWS for our testing and we love it! Using the AWS Python library boto and Fabric can be a good combo for automating and setting up your slave machines and uploading your Locust scripts.

For more information on how to run Locust distributed set up see the new documentation page

heyman
  • 4,845
  • 3
  • 26
  • 19
cgbystrom
  • 1,927
  • 1
  • 14
  • 11
  • Thats great. I just updated my question to include the master slave node information. – Jonathan Reyes May 22 '14 at 06:07
  • Hello, i am running locust with master and slave mode with 8 slaves. i set Number of users as 500 and hatch rate of 200. I see my locust master process gets killed after sometime saying out of memory. Locust master and slave are running on 64 bit Ubuntu 4 GB RAM. I see locust consumes almost around 3 GB of memory. Can you please help me to fix this issue. MIN_WAIT and MAX_WAIT are set to 10 and 100 respectively – santosh Jul 02 '14 at 17:59
  • in practice, there is no limit on how many concurrent users you can overwhelm the system, I set up a 1 master 20 slaves cluster before. – Moses Liao GZ Feb 04 '16 at 02:49
  • do you have specific setup on the master/slave/target machine? I have 128 slave and not having any problem spawning 100k open websocket connections, but the requests per second stuck at ~60k. – O.O Feb 01 '18 at 00:59
  • @cgbystorm - I am having issues running Locust for a simulation 3500 users. My slaves machines are getting CPU maxed out even at 250 users. we are using 8 core CPUs, 16 GB ram Linux machine on Azure. From the above answer, i just saw we can run "Slaves" per core. Does that mean on a single machine with 8 core CPU, we can run 8 slaves? If yes, how to do it? opening different sessions on ssh and run "locust --slave...." muliple times... Please let us know – user1597990 Feb 28 '20 at 17:22
  • user1597990 that is correct, open a new session and run locust --worker on each terminal and that's one way to get started on using all your cores – Buya Nami Dec 16 '21 at 06:06