Skip to content

Difference between Req/Sec and Requests/sec? #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
palaiya opened this issue Feb 20, 2017 · 10 comments
Closed

Difference between Req/Sec and Requests/sec? #259

palaiya opened this issue Feb 20, 2017 · 10 comments

Comments

@palaiya
Copy link

palaiya commented Feb 20, 2017

what is the difference between Req/Sec and Requests/sec? In the below example which is given in your documentation. both the values are different. Could you please provide the links for the same also where it is explained?

Running 30s test @ http://127.0.0.1:8080/index.html
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   635.91us    0.89ms  12.92ms   93.69%
    Req/Sec    56.20k     8.07k   62.00k    86.54%
  22464657 requests in 30.00s, 17.76GB read
Requests/sec: 748868.53
Transfer/sec:    606.33MB
@defanator
Copy link

Hi @palaiyacw,

Req/Sec represents numbers obtained per thread, while Requests/sec is a total from all threads.

@palaiya
Copy link
Author

palaiya commented Feb 20, 2017

@defanator

I ran wrk for 1 thread and following are the result. Why there is a difference between Req/Sec and Requests/sec.

 wrk -t1 -c100 -d20s http://172.16.5.40:8082/test
Running 20s test @ http://172.16.5.40:8082/test
  1 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    59.61ms  172.66ms   1.31s    94.03%
    Req/Sec     7.10k     3.14k   14.39k    72.47%
  127061 requests in 20.01s, 14.06MB read
Requests/sec:   6348.95
Transfer/sec:    719.22KB

@knasim
Copy link

knasim commented Apr 6, 2017

@palaiyacw - interesting observation - although the Req/Sec and Requests/Sec will never be the same even if using 1 thread because it depends on number of connections.

@lanphan
Copy link

lanphan commented Jun 13, 2017

@knasim can you give more information why Req/sec and Requests/sec are different for 1 thread case?
In addition, when we run tests for 1 thread case, which number (Req/sec or Requests/sec) is more accurate?
Thanks.

@knasim
Copy link

knasim commented Jun 13, 2017

@lanphan - that is related to IO and the # of sockets it can open on the OS it is running on

you have to look at all the figures that the program returns after the stress test. it is not a question of looking at one over the others. you have to do a composite analysis. there is also another flag you can provide to get more details on latency as well.

@wg
Copy link
Owner

wg commented Jan 21, 2018

Thanks @defanator & @knasim!

In addition to Latency and Req/Sec being per-thread stats, they're also statistics periodically captured during a benchmarking run. So avg is the average req/sec over the testing interval whereas Requests/sec is simply total requests / total time.

@wg wg closed this as completed Jan 21, 2018
@yangboyd
Copy link

Thanks @defanator & @knasim!

In addition to Latency and Req/Sec being per-thread stats, they're also statistics periodically captured during a benchmarking run. So avg is the average req/sec over the testing interval whereas Requests/sec is simply total requests / total time.

It'd better to add this to the first page readme.
There is another question: Does the Requests mean successful requests or initialized requests(include failed requests)?

@baiwfg2
Copy link

baiwfg2 commented Jul 11, 2020

@defanator Req/Sec represents numbers obtained per thread, While I look at the code, statistics.requests is a global statistics which is atomically modified by multiple threads, and Req/Sec derives from it (Obviously it's not per-thread metric, otherwise there'll be many lines of Req/Sec). Am I wrong ?

@baiwfg2
Copy link

baiwfg2 commented Jul 11, 2020

I suppose these two are fairly unrelated. If we're gonna tell people what the benchmarking's qps is, I'd say the number of Requests/Sec instead of Avg of Req/Sec. Is that right ?

@jrochkind
Copy link

jrochkind commented Oct 27, 2020

Hm, if I'm runing with -c 1 -t 1 should I expect Thread Stats => Req/sec to be the same as the Requests/sec? Or at least close?

Because they are not for me. My Req/sec is always twice or more the Requests/sec when running with -c 1 -t 1.

I'm not sure if indicates I am not understanding "connections" and "threads" settings correctly, or that I'm not understanding what req/sec and/or Requests/sec mean.

I am just getting started using wrk and I love it, thank you for it! But of course I want to be sure I understand what the reports mean to make sure I'm drawing the correct conclusions from it! More docs would be super useful.

Here are two examples against two different sites -- both using a multiplepaths.lua to test a list of URLs instead of just one url -- both showing a Req/Sec twice or more the Requests/Sec.

Running 3m test @ [site]
  1 threads and 1 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   309.22ms  386.30ms   2.57s    86.42%
    Req/Sec    11.67      8.85    38.00     70.75%
  Latency Distribution
     50%   97.95ms
     75%  449.39ms
     90%  847.98ms
     99%    1.68s
  962 requests in 3.00m, 176.59MB read
Requests/sec:      5.34
Transfer/sec:      0.98MB

and

Running 3m test @ [site]
  1 threads and 1 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   522.18ms  679.45ms   3.94s    86.42%
    Req/Sec     7.46      5.52    30.00     65.29%
  Latency Distribution
     50%  160.24ms
     75%  772.34ms
     90%    1.47s
     99%    3.13s
  458 requests in 3.00m, 78.96MB read
  Socket errors: connect 0, read 0, write 0, timeout 1
  Non-2xx or 3xx responses: 16
Requests/sec:      2.54
Transfer/sec:    448.93KB

I don't understand what to take from the fact that these are so different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants