0

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.

Krash
  • 2,085
  • 3
  • 13
  • 36
  • 1
    hi! have a look at https://github.com/locustio/locust/wiki/FAQ#increase-my-request-raterps and if that doesnt help, post lour locust file here so I can take a look. is your server call an http request? if not, make sure it is still gevent-friendly. (otherwise it will block all locust users in the locust process) – Cyberwiz Sep 02 '20 at 11:01
  • I was using grpc and it was causing problems, as it is not gevent friendly. I was able to fix it by using monkey patch and grpc gevent patch – Krash Sep 02 '20 at 12:32

1 Answers1

2

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()
Krash
  • 2,085
  • 3
  • 13
  • 36