当前位置:网站首页>Some formulas for system performance and concurrency
Some formulas for system performance and concurrency
2022-08-11 06:34:00 【cjx__】
Some formulas for system performance and concurrency
Concurrency per unit time
QPS(TPS)=Number of concurrency/average response time
QPS(TPS): Number of requests/transactions per second
Number of concurrency: Number of requests/transactions processed by the system at the same time
Response time: AverageTake the average response time
Maximum number of threads
Max number of threads=(MaxProcessMemory – JVMMemory – ReservedOsMemory) / (ThreadStackSize)
Name | Meaning |
---|---|
MaxProcessMemory | Maximum memory for process |
JVMMemory | JVM memory |
ReservedOsMemory | JVM local memory |
ThreadStackSize | Thread stack size |
Number of threads that can be started per unit time
Number of startup threads=(task execution time/(task execution time-IO waiting time))*CPU cores
Number of simultaneous online households
With or without thinking time (T_think), the TPS value obtained from the test and the number of concurrent virtual users (U_concurrent) and the transaction response time (T_response) read by Loadrunner have the following relationship (in stable operation):
TPS=U_concurrent / (T_response+T_think).
Response time: the time it takes to respond to a request
Network transmission time: N1+N2+N3+N4
Application server processing time: A1+A3
Database server processing time: A2
Response time=N1+N2+N3+N4+A1+A3+A2
The formula for calculating the number of concurrent users
Number of system users: The rated number of users of the system, such as an OA system, the total number of users who may use the system is 5000, then this number is the number of system users.
Number of simultaneous online users: the maximum number of simultaneous online users within a certain time range.
The number of simultaneous online users = the number of requests per second RPS (throughput) + the number of concurrent connections + the average user thinking time
The calculation of the average number of concurrent users: C=nL / T
where C is the average concurrentThe number of users, n is the average number of users accessing the system per day (login session), L is the average time from login to logout within a day (the average time of the login session), T is the length of the investigation time (how long does a user use the system in a day))
Calculation of the peak number of concurrent users: C^ is approximately equal to C + 3*root number C
where C^ is the peak number of concurrent users, C is the average number of concurrent users, the formula follows the Poisson distribution theory.
Calculation formula for throughput:
F: Throughput, VU: Number of virtual users, R: Number of requests issued by each virtual user, T: Time spent in performance testing
F=VU * R / T
Performance Counters
Resource utilization = actual resource usage/total resource availability
Calculation formula for thinking time
T: Time
TS: User think time
R = T / TS
General steps for calculating think time:
A. First calculate the number of concurrent users in the system
C=nL / T F=R×C
B. Calculate the average throughput of the system
F=VU * R / T R×C =VU * R / T
C, count the average number of requests sent by each user
R=u*C*T/VU
D, calculate the thinking time according to the formula
TS=T/R
Reference address:
https://blog.csdn.net/workdsz/article/details/78417108 Performance test performance indicators
https://www.zhihu.com/question/21556347 PV, TPS, How is QPS calculated
https://en.wikipedia.org/wiki/TPS_report Encyclopedia knowledge
边栏推荐
猜你喜欢
随机推荐
关于接口响应内容的解码
ActiveReports报表分类之页面报表
关于if(x)和while(x)的解释
Interpretation of the paper: GAN and detection network multi-task/SOD-MTGAN: Small Object Detection via Multi-Task Generative Adversarial Network
Goldbach's conjecture and the ring of integers
Node 踩坑之80端口被占用
js写四位随机数能有多少种可能性?并列出所有可能性
win10 配置tensorflow(GPU) anaconda3 cuda9.0 cudnn for 9.0
活动预告 | 4月23日,多场OpenMLDB精彩分享来袭,不负周末好时光
物联网基础知识学习
Ubuntu下安装mysql笔记
开源机器学习数据库OpenMLDB贡献者计划全面启动
Visual studio2019 configuration uses pthread
net6 的Web MVC项目中事务功能的应用
红外线一认识
CMT2380F32模块开发1-硬件
mysql基础总结
编译异常解决
The Summer of Open Source 2022 is coming | Welcome to sign up for the OpenMLDB community project~
CMT2380F32模块开发3-GPIO例程