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

请问最短耗时,最长耗时和平均响应时间的单位是什么? #10

Closed
ghost opened this issue Nov 3, 2019 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Nov 3, 2019

请问最短耗时,最长耗时和平均响应时间的单位是什么?

@link1st
Copy link
Owner

link1st commented Nov 3, 2019

短耗时,最长耗时和平均响应时间 是毫秒

@ghost
Copy link
Author

ghost commented Nov 3, 2019

好的,如果求网站承受的最大并发数是不是可以用这个公式qps*(平均响应时间/1000) @link1st

@link1st
Copy link
Owner

link1st commented Nov 3, 2019

一般计算服务器性能都是使用的是 QPS ,而不是并发数 24-如何计算压测指标

并发指一个处理器同时处理多个任务的能力(逻辑上处理的能力),与 CPU 调度有关,一般不作为性能指标

@ghost
Copy link
Author

ghost commented Nov 3, 2019

但是访问不同的接口qps不同,我怎么能够算出平均的qps值 ,或者怎么估算能代表这个网站的qps值@link1st

@link1st
Copy link
Owner

link1st commented Nov 3, 2019

可以利用 nginx access日志,所有的请求地址、请求时间都被记录下来了,这样就能算出总的请求量,然后可以按 公式: ( 总PV数80% ) / ( 每天的秒数20% ) = 峰值时间每秒钟请求数(QPS) 计算

如果知道请求峰值在哪个时间段,可以查询这个时间点的总的请求量进行计算QPS~

nginx access日志 参考

114.252.52.208 - - [03/Nov/2019:12:35:23 +0800] "GET /user/list HTTP/1.1" 200 59 "http://im.91vh.com/home/index" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36"

@ghost ghost closed this as completed Nov 4, 2019
This issue was closed.
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

1 participant