Search code examples
locust

Unable to improve RPS for my locust tests


I am trying to load-test a server call, whose response time is around 3 seconds. I am trying to increase load to this server but the maximum rps I get is 0.3-0.4. I have 100 users and I have kept the hatch rate 100/s. Also, the wait_time is 0.1s.

Why is the rps so low and what can I do to improve it?

If I replace my server call with a very cheap call, suddenly the RPS increases by a lot. So, I don't think the problem is with my setup.


Solution

  • My server was a grpc server and it was causing issue with gevent. Adding this before initialization of any grpc client fixed the issue

    from gevent import monkey
    monkey.patch_all()
    
    import grpc.experimental.gevent
    grpc.experimental.gevent.init_gevent()