GithubHelp home page GithubHelp logo

Comments (15)

DavideRossi avatar DavideRossi commented on June 15, 2024 1

Yup, that's it!
The main reason being that this way I can tinker with the web interface parameters to change the load

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

Try using more clients. If ramp up finishes really fast then you probably wont reach the target throughput, so rps_sleep will warn you about it.

It is just a warning though... rps_sleep will just sleep for zero ms if you are not reaching the target rps.

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

This may indeed be the case, with 10 clients I don't get the warning anymore.
My problem is, though, that with 10 clients, an average response time of 14ms, I only get a request rate of 1.3. What am I missing? Is the rps in rps_sleep a per-client RPS or an overall one?

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

It is overall. Do you have any other sleeps (or maybe a wait_time) configuted somewhere?

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

Oh, overall... this is kind of tricky. I mostly run my tests from the web interface so the only thing I can change is the number of clients. To really change the load I have to change the locustfile (or the parameters it uses) which is not straightforward when they are run in a set of distributed containers. In this context it would be more useful to have a per-client rate.

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

There’s a per client rate wait_time built into locust nowadays. It is called constant_pacing

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

Yes, I saw that. My understanding is that this operates on a per-client basis whereas TaskSetRPS operates on a global basis.
If I understand this right, it means that if I set a constant_pacing of 1 second but the response time is 1.5 seconds (because of a spike) the overall rate decreases where as TaskSetRPS compensates for that with other clients in order to keep the overall rate constant (as long as the average response time is less than 1 second, obviously). Is this right?

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

Yes, that is correct.

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

Well, then a per-client rate would be more than appreciated. Let's label this a feature request?

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

Huh? constant_pacing is already per-client - do you need something more?

Or do you mean per-client rate insted of per-client pacing? That is just the inverse, e.g. to get 2 req/s, use constant_pacing(1/2)

Although I do actually have a PR that adds that (along with rps_sleep) to locust core (locustio/locust#1241). Feel free to upvote it :)

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

Actually I meant a per-client rate for TaskSetRPS!

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

Ok, is there some reason you prefer to have it in TaskSetRPS instead of the built in? :)

from locust-plugins.

DavideRossi avatar DavideRossi commented on June 15, 2024

Well, for the reason above: TaskSetRPS can compensate between clients to keep a steady overall request rate.

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

Aha, you want to set a per-client target but allow for compensation between clients?

from locust-plugins.

cyberw avatar cyberw commented on June 15, 2024

I personally dont use the web interface, but I do understand why you want it. If you want to build it then I'd be happy to merge it (to locust-plugins at least, my PR for locust itself might not get merged unless I manage to convince @heyman...)

from locust-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.