GithubHelp home page GithubHelp logo

Comments (5)

t-lo avatar t-lo commented on August 22, 2024

Hello @Jonarod,

Wrt. your first example, -t 4 -c 10000 will open 10k connections overall, in 4 threads (2500 connections per thread).

The third paragraph seems to imply a "connection" (pardon my english) between RPS and connections which in fact does not exist. Connections, once established, are being kept alive for the whole run. RPS are distributed evenly among connections, so your example would issue 1 RPS per connection, on average.

To emulate a load of 10k users, these settings may not suffice. Even though generating a relatively heavy load overall, the settings would imply that a single user would issue a meekly 1RPS. Assuming a single connection per user which is reused across requests (e.g. a well-behaving browser), you might want to consider bumping the RPS to a rate that reflects the load you'd expect per user, times 10,000.

Tuning wise, you also might want to consider bumping the thread count - have a look at the CPU load when wrk2 runs, and increase -t up to the number of CPUs in your load generator machine.

Lastly, the connections command line parameter sets the overall connection count, so it needs to be equal, or larger than, the number of threads. Therefore, your last example would cause an error message, as it uses -t > -c.

Hope this helps!

from wrk2.

Jonarod avatar Jonarod commented on August 22, 2024

you might want to consider bumping the RPS to a rate that reflects the load you'd expect per user, times 10,000

So I understand that, in order to emulate a load of 10.000 simultaneous users issuing 1 request at the same time, the correct parameters should be:

wrk -t4 -c10000 -d70 -R 10000 -L http://localhost:8080

Thanks for your insights @t-lo

from wrk2.

t-lo avatar t-lo commented on August 22, 2024

Hello @Jonarod,

Your statement is correct. As stated, I recommend increasing the number of threads (to match the number of cores in your load generator machine). My concern is that you will max out the 4 cores being used in your example (-t 4) - so you would be measuring the "latency" of your load generator's overloaded 4 cores instead of benchmarking your application.

Happy to help,
Thilo

from wrk2.

Fatahir avatar Fatahir commented on August 22, 2024

Hi @t-lo correct me if i am wrong. what i understand is that during the run, the number of connections and number of threads are constant. but what about the R. if i want that at every time, the number of requests per second increases by 500. can i change it ?

from wrk2.

Triple-Z avatar Triple-Z commented on August 22, 2024

So I understand that, in order to emulate a load of 10.000 simultaneous users issuing 1 request at the same time, the correct parameters should be:

wrk -t4 -c10000 -d70 -R 10000 -L http://localhost:8080

In this scenario, the first 10000 requests are sent at the beginning of the second and not continuous sending requests in the rest of the first second, do I understand this right?

from wrk2.

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.