当前位置:网站首页>Interpretation of concurrent virtual users, RPS and TPS
Interpretation of concurrent virtual users, RPS and TPS
2022-07-19 02:30:00 【[email protected]】
During the performance test , The traditional way is to use the number of concurrent virtual users to measure the performance of the system ( From the client's perspective ), It is generally applicable to some web sites, such as the home page 、H5 Piezometry of ; and RPS(Requests per second) The mode is mainly used to directly measure the throughput capacity of the system TPS(Transaction Per Second, Transactions per second ) And designed ( From the perspective of the server ), According to the requirements of the end to be tested, it is required to achieve TPS Set the corresponding... In equal quantities RPS, Application scenarios are mainly dynamic interfaces API, For example, log in 、 Submit orders, etc .
VU( Virtual user ) and TPS There is also a logical relationship between , For details, please refer to the description at the bottom of this article .
Definition of terms
- Number of concurrent users : abbreviation VU, It refers to the users who operate the business in the real system , In performance testing tools , Generally called the number of virtual users (Virtual User), Note that the number of concurrent users and the number of registered users 、 The number of online users varies greatly , The number of concurrent users will definitely put pressure on the server , And the number of online users is just ” hang ” On the system , No pressure on the server , The number of registered users generally refers to the number of users in the database .
- processing capacity : abbreviation TPS, Transactions per second , It is a very important index to measure the system performance .
- response time : abbreviation RT, It refers to the time from the initiation of the business by the client to the acceptance of the business by the client .
VU and TPS conversion
A simple example : In terms of TPS Is the number of transactions per second , But transactions are done by virtual users , If 1 Virtual users in 1 seconds 1 Transactions , that TPS Obviously 1; If a business response time is 1 ms, that 1 Users in 1s It can be done within a week 1000 Transactions ,TPS Namely 1000 了 ; If a business response time is 1s, that 1 Users in 1s Can only be completed within 1 Transactions , To achieve 1000 TPS, Need at least 1000 Users ; So we can say 1 Users can generate 1000 TPS,1000 Individual users can also generate 1000 TPS, It just depends on the response time .
Complex formulas : Imagine a complex scene , Multiple scripts , Multiple transactions are defined in each script ( For example, a script has 100 A request , We put this 100 A continuous request is called Action, Only the first one 10 A request , The first 20 Each request defines a transaction 10 And transaction 20) The formula is as follows .
Symbols represent meaning :
- Vui It means No i Number of concurrent users used by scripts .
- Rtj It means No i Script No j Time spent on a transaction , This time will affect the whole Action Time .
- Rti It means No i Time for a script to complete all operations at once , namely Action Time .
- n It means No n Script .
- m It means that in each script m One transaction .
- So the first j A business TPS = Vui/Rti.
The total TPS=

.
How to get VU and TPS
- VU Access method :
Existing systems : Peak hours can be selected , The number of people who use the system in a certain period of time , These numbers can be considered as the number of online users , The number of concurrent users can be taken as 10%, For example, in half an hour , The number of users using the system is 10 ten thousand , Then take 10%( namely 1 ten thousand ) As the number of concurrent users is basically enough .
New system : There is no historical data for reference , It is recommended to evaluate through the business department .
- TPS Access method :
Existing systems : Peak hours can be selected , In a certain amount of time ( Such as 3 minute ~10 minute ), Get the total business volume of the system , Unit of time ( second ) Number of transactions completed in , multiply 2~5 Times as peak TPS, For example, peak values 3 Process order in minutes 18 Ten thousand brush , Average TPS yes 1000, Peak value TPS It can be 2000~5000.
New system : There is no historical data for reference , It is recommended to evaluate through the business department .
How to evaluate the performance of the system
For server-side performance , With TPS Mainly to measure the performance of the system , The number of concurrent users is used to measure the performance of the system , If it has to be measured by the number of concurrent users , There needs to be a premise , That's how long the deal will take , Because when the system load is not high , Will think about time ( The value of thinking time is equal to the response time of transaction ) Add to the serial link , The number of concurrent users can almost double , So it doesn't make much sense to measure the performance of the system with the number of concurrent users . alike , If the throughput capacity between systems varies greatly , Then under the same concurrency TPS There will also be a big gap .
Performance testing strategy
Performance testing requires a set of standardized processes and testing strategies . When doing load testing , The traditional way is to increase the number of users according to the gradient pressure , Avoid doing things without an estimate , Add tens of thousands of users at a time , Resulting in a very high rate of transaction failure , The response time is very long , It's beyond the user's tolerance ; More suitable for Internet distributed architecture , Alibaba's best practice is to use TPS Pattern ( Throughput mode )+ Set the starting and target maximum magnitude , Then according to the performance of the system, the flexible manual real-time speed regulation , More efficient , The measurement of the throughput capacity of the server is in place in one step . For more information , Please see the How to set target concurrency or target RPS.
summary
in summary , The following conclusions can be drawn :
- The performance of the system is determined by TPS decision , It has nothing to do with the number of concurrent users .
- Maximum of the system TPS It must be ( Within a range ), But the number of concurrent users is not necessarily , You can adjust .
- It is recommended that performance testing , Don't set too much thinking time , Put pressure on the server in the worst case .
- In general , Large systems ( Business volume is large 、 There are many machines ) Do a stress test ,10000~50000 Concurrent users , Pressure test for small and medium-sized systems ,5000 Concurrent users are common
This article is from Alibaba cloud
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/200/202207170009048642.html
边栏推荐
- 【Unity编辑器扩展】Unity内部Asset资源配置ScriptableObject
- Gdb+vscode for debugging 4 - GDB executes relevant commands
- 剑指 Offer 48. 最长不含重复字符的子字符串
- [unity Editor Extension] unity makes its own exclusive editor panel
- 网络层传输协议(详解)
- 软件测试技术期中测试小结|软件测试基础&执行测试&测试设计和开发
- How to configure multiple SSH keys for novices (easy to understand hand-in-hand teaching)
- CTFHub----RCE
- UE4 notes
- Unity3D 游戏人物跳跃落地时发生弹跳,偏移情况的解决方法
猜你喜欢

Buaaos-lab0 experimental report

How to configure multiple SSH keys for novices (easy to understand hand-in-hand teaching)
![[unity Editor Extension] the pre-processing and post-processing pictures of unity assets are automatically transferred to sprite2d](/img/84/34879d5c0b6e19d599c99eec944c26.png)
[unity Editor Extension] the pre-processing and post-processing pictures of unity assets are automatically transferred to sprite2d

STL -- deque container

Chapter 2 - system control principle - > classical control theory

Gdb+vscode for debugging 3 - vscode and GDB remote debugging

Installing MySQL and JDBC on Windows

sqlmap的使用

Stl--queue container

Attack and defense world - easytornado notes
随机推荐
简单的用例编写规范
[unity Editor Extension] unity publishes resources to the store process unity asset store publish
BeanShell脚本获取当前时间
最长上升子序列----优化
【Unity编辑器扩展】Unity制作自己的专属的编辑器面板
【Unity编辑器扩展】Unity内部Asset资源配置ScriptableObject
Stl--queue container
bugku---game1
【Unity开发小技巧】Unity混音器Mixer控制全局音量
Lecture 2 BTC cryptography principles (notes)
Detailed explanation of caduceus project of metauniverse public chain (I): project concept and technical framework of caduceus metaverse protocol
深入性能测试数据分析
"Visual C # from getting started to mastering" personal learning arrangement
【工具篇】SQLite本地数据库在Unity3D的应用
How to configure multiple SSH keys for novices (easy to understand hand-in-hand teaching)
SSTI模板注入
postman的json脚本转jmeter的jmx脚本
[unity Editor Extension] the pre-processing and post-processing pictures of unity assets are automatically transferred to sprite2d
Bugku---- regular matching, cookies
Cocoon breaking and rebirth of 3D NFT: caduceus decentralized edge rendering technology