Skip to content
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

[common] qps & concurrent & tps & rt #216

Closed
Alice52 opened this issue Jul 13, 2021 · 0 comments
Closed

[common] qps & concurrent & tps & rt #216

Alice52 opened this issue Jul 13, 2021 · 0 comments

Comments

@Alice52
Copy link
Owner

Alice52 commented Jul 13, 2021

summary

  • qps/tps 广义上是一个含义, 且是有响应的请求数
  1. qps: 每秒钟request数量: 每秒接受请求数: 静态的不需要计算DB则为 QPS纯静态的东西, nginx 上的静态 html/js/css 等
  2. tps: 每秒钟事务数量: 每秒处理请求数: 动态的需要计算或DB(进入 java 代码)就是 TPS
  3. rt: 平均响应时间
  4. 并发数=QPS*RT
  5. 峰值并发=并发数 + 3*sqrt(并发数)

prepare

1. 假设超市每分钟有10个人走出来,请估算超市里面有多少人?

  • 在一个稳定的系统中,设长时间观察到的平均顾客数量为L,长时间观察到的有效到达速率为λ,
  • 平均每个顾客在系统中花费的时间是W: L = λW

image

introduce

  1. QPS: 请求进入的速度

  2. 并发数: 系统中同时存在的请求数 耗时内的并发数

  3. 并发数 = QPS * 耗时

    image

    image


reference

  1. https://mp.weixin.qq.com/s/bGwkkQp64V5Pmz0HlKW8cQ
  2. https://mp.weixin.qq.com/s/iszXWCIwAErPw_7y8I19hw
  3. https://mp.weixin.qq.com/s/LARaG8lKGISLRldEUihvWw
  4. https://mp.weixin.qq.com/s/voHdZHfCNyOFaTUOAt65fQ
@Alice52 Alice52 self-assigned this Jul 13, 2021
@Alice52 Alice52 closed this as completed Jul 13, 2021
@Alice52 Alice52 pinned this issue Aug 23, 2021
@Alice52 Alice52 changed the title [common] qps & concurrent [common] qps & concurrent & tps & rt Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant