当前位置:网站首页>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
边栏推荐
- The Summer of Open Source 2022 is coming | Welcome to sign up for the OpenMLDB community project~
- 微信和抖音都到十亿级用户了,作为产品经理的你们觉得哪个产品更成功?
- USB中用NRZI来编码数据
- 哥德巴赫猜想与整数环
- KANO模型——确定需求优先级的神器
- Invalid revision: 3.18.1-g262b901-dirty
- Promise 中状态改变和回调执行先后顺序 和promise多次回调
- 贡献者任务第三期精彩来袭
- STM32学习笔记(白话文理解版)—USART通信接口
- CMT2380F32模块开发5-CLK例程
猜你喜欢
EMQX企业版试用笔记
Tinker接入全流程---编译篇
网络七层结构(讲人话)
红外线一认识
开源机器学习数据库OpenMLDB贡献者计划全面启动
STM32学习笔记(白话文理解版)—USART通信接口
Visual studio2019 configuration uses pthread
NUC980-镜像烧录
Interpretation of the paper: GAN and detection network multi-task/SOD-MTGAN: Small Object Detection via Multi-Task Generative Adversarial Network
构建面向特征工程的数据生态 ——拥抱开源生态,OpenMLDB全面打通MLOps生态工具链
随机推荐
活动预告 | 4月23日,多场OpenMLDB精彩分享来袭,不负周末好时光
Diagnostic Log and Trace——dlt的编译和安装
STM32 基于固件库的工程模板的建立
弱监督语义分割CLIMS(CVPR2022)
CMT2380F32模块开发3-GPIO例程
Asp doNet Mvc4绑定js脚本用法
umi约定式路由规则修改
微信和抖音都到十亿级用户了,作为产品经理的你们觉得哪个产品更成功?
自定义形状seekbar学习
何凯明新作ViTDET:目标检测领域,颠覆分层backbone理念
USB URB
Visual studio2019 configuration uses pthread
Goldbach's conjecture and the ring of integers
产品版本号是如何确定的
mk文件介绍
OpenMLDB v0.5.0 发布 | 性能、成本、灵活性再攀高峰
vscode插件开发——代码提示、代码补全、代码分析(续)
mysql基础总结
如何快速转行做产品经理
net6的Web MVC项目实现限流功能