


Detailed explanation of TPS, QPS, number of concurrencies, and response time
QPS
Principle: 80% of visits every day Concentrate on 20% of the time, this 20% of time is called peak time.
Formula: (Total PV * 80%) / (Seconds per day * 20%) = Requests per second (QPS) at peak time.
Machine: Peak time QPS per second / QPS of a single machine = required machine.
300w PV per day on a single machine, how many QPS does this machine require?
(3000000 * 0.8) / (86400 * 0.2) = 139 (QPS).
Generally it needs to reach 139QPS because it is the peak value.
QPS
Query rate per second QPS is a measure of how much traffic a specific query server handles within a specified period of time.
Query rate per second
On the Internet, the query rate per second is often used to measure the performance of the domain name system server machine, which is QPS.
Corresponds to fetches/sec, which is the number of response requests per second, which is the maximum throughput capacity.
Computer language
A computer programming language. Used for data analysis and report output. The operating platform is MRDCL. Supported data files include ASC format and CSI format.
The CSI format is the unique data format of QPS. It is an extremely professional language used for data analysis, data cleaning and report output. It is currently most widely used in the market research industry. There are relatively few domestic applications in China.
The reason for development requires an understanding of the concepts of throughput (TPS), QPS, number of concurrencies, and response time (RT). Check it from Baidu Encyclopedia and record it as follows:
1. Response time (RT)
Response time refers to the time it takes for the system to respond to a request. Intuitively, this indicator is very consistent with people's subjective feelings about software performance, because it completely records the time it takes for the entire computer system to process requests. Since a system usually provides many functions, and the processing logic of different functions is also very different, the response time of different functions is also different, and even the response time of the same function is different under different input data. Therefore, when discussing the response time of a system, people usually refer to the average time of all functions of the system or the maximum response time of all functions. Of course, it is often necessary to discuss the average response time and maximum response time for each function or group of functions.
For single-machine application systems without concurrent operations, it is generally believed that response time is a reasonable and accurate performance indicator. It should be pointed out that the absolute value of the response time does not directly reflect the performance of the software. The performance of the software actually depends on the user's acceptance of the response time. For a game software, a response time of less than 100 milliseconds should be good. A response time of about 1 second may be barely acceptable. If the response time reaches 3 seconds, it is completely unacceptable. For the compilation system, it may take dozens of minutes or even longer to completely compile the source code of a larger-scale software, but these response times are acceptable to users.
2. Throughput (Throughput)
Throughput refers to the number of requests processed by the system per unit time. For application systems without concurrency, throughput is strictly inversely proportional to response time. In fact, throughput is the reciprocal of response time. As mentioned before, for single-user systems, response time (or system response time and application delay time) can be a good measure of system performance, but for concurrent systems, throughput is usually used as a performance indicator.
For a multi-user system, if there is only one user using the system, the average response time is t. When there are n users using it, the response time seen by each user is usually not n×t. , which is often much smaller than n×t (of course, in some special cases it may be larger than n×t, or even much larger). This is because processing each request requires a lot of resources. Since there are many steps in the processing of each request that are difficult to execute concurrently, this results in that at a specific point in time, the resources occupied are often not many. That is to say, when processing a single request, many resources may be idle at each point in time. When processing multiple requests, if the resources are configured reasonably, the average response time seen by each user does not increase as the number of users increases. linear increase. In fact, the average response time of different systems increases at different rates as the number of users increases. This is also the main reason for using throughput to measure the performance of concurrent systems. Generally speaking, throughput is a relatively common indicator. If the maximum throughput of two systems with different numbers of users and user usage patterns is basically the same, it can be judged that the processing capabilities of the two systems are basically the same.
3. Number of concurrent users
The number of concurrent users refers to the number of users that the system can simultaneously host and use system functions normally. Compared with throughput, the number of concurrent users is a more intuitive but also more general performance indicator. In fact, the number of concurrent users is a very inaccurate indicator, because different usage patterns of users will cause different users to issue different numbers of requests per unit time. Take a website system as an example. It is assumed that users can only use it after registering. However, registered users do not use the website all the time. Therefore, only some registered users are online at a specific moment. Online users will spend a lot of time browsing the website. It takes time to read the information on the website, so only some online users make requests to the system at the same time at a specific time. In this way, we will have three statistics about the number of users for the website system: the number of registered users, the number of online users, and the number of users making simultaneous requests. Since registered users may not log in to the website for a long time, using the number of registered users as a performance indicator will cause a large error. The number of online users and the number of users sending requests from colleagues can both be used as performance indicators. In comparison, it is more intuitive to use online users as the performance indicator, and it is more accurate to use the number of simultaneous requesting users as the performance indicator.
4. QPS query rate per second (Query Per Second)
The query rate per second QPS is the amount of traffic processed by a specific query server within a specified time. On the Internet, the performance of a machine acting as a Domain Name System server is often measured by the query rate per second. Corresponds to fetches/sec, which is the number of response requests per second, which is the maximum throughput capability. (It seems to be similar to TPS, but is applied to the throughput of specific scenarios)
Recommended tutorial: "PHP"
The above is the detailed content of Detailed explanation of TPS, QPS, number of concurrencies, and response time. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Laravel Caching Mechanism: Accelerate Application Response Time Introduction: In today's Internet era, fast application response time is crucial to user experience and business success. In order to improve the performance and responsiveness of the application, developers need to adopt some strategies. One of them is to use caching mechanism. As a popular PHP framework, Laravel provides a powerful caching mechanism that can help us speed up the response time of our applications. This article will introduce in detail the use of Laravel caching mechanism

How to configure Nginx proxy server to speed up the response time of web services? Introduction: In today's Internet era, fast and responsive Web services are crucial to user experience. As a high-performance lightweight reverse proxy server, Nginx can effectively improve the response speed of Web services. This article will introduce how to configure the Nginx proxy server to speed up the response time of web services, and provide detailed instructions with code examples. Part One: Install and Configure Nginx Proxy Server Install Nginx First

Improving the throughput of the storage engine: MaxScale application case in MySQL Introduction: In the current big data and high-concurrency environment, how to improve the throughput of the database has become a problem faced by many enterprises and developers. As a commonly used open source relational database, MySQL's performance optimization has always attracted much attention. This article will introduce a method to improve the throughput of MySQL database by using the MaxScale tool, as well as specific application cases. 1. Introduction to MaxScale MaxScale is

In recent years, with the continuous advancement of audio technology and the increasing diversity of consumer needs, many innovative products have emerged in the headphone market. However, for many music lovers, "flat head plugs" are still their favorite form of headphones. Whether it’s because they are comfortable to wear or have a looser and more natural sound, flat-top plugs have indeed always had some loyal fans on the market. Among them, FiiO FF3S is a flat-head plug that I have been using this year, and I found that compared with other models in the same price range, FiiO FF3S does have many unique features in terms of listening experience. In particular, its excellent acoustic design makes me satisfied with the sound of this headset. Today I will share with you some of my feelings about using it. Appearance design: lightweight innovative metal material

1. Using the cache caching mechanism can significantly reduce the number of database accesses, thereby improving performance. Commonly used caching technologies include: Local caching: stores frequently used data in memory to speed up access to frequently accessed data. Distributed cache: Store data in clustered cache servers to improve scalability and fault tolerance. Sample code: @Cacheable(value="users")publicUsergetUserById(Longid){//Get the user from the cache, if not, get it from the database and store it in the cache Useruser=userCache.get(id);if(user==null ){user=userRepositor

What are the methods for website performance optimization? Specific code examples are required. With the rapid development of the Internet, website performance optimization has become increasingly important. A high-performing website not only improves user experience, but also attracts more visitors and increases conversion rates. This article will introduce some commonly used website performance optimization methods and provide specific code examples to help readers better understand. Compression and merging of static resources Compression and merging of static resources can reduce the loading time of web pages. Static resources (such as CSS, JavaScript

How to solve the problem of unresponsive system processes When using computers or other devices, we sometimes encounter unresponsive system processes. We often feel anxious and confused in this situation because it may cause the device to freeze, crash, or not function properly. However, there is no need to worry as fixing the system process unresponsiveness problem can usually be achieved through simple methods. This article will introduce some common solutions to help you solve the problem of unresponsive system processes. 1. Check the resource usage of the device. The unresponsiveness of the system process may be due to the device resources being used.

How to speed up API request response time through PHP multi-threading Introduction: With the rapid development of the Internet, more and more applications are beginning to use APIs to obtain and exchange data. However, when an application needs to send multiple API requests simultaneously, response times can become very long. To solve this problem, developers can consider using PHP's multi-threading to speed up the response time of API requests. This article will introduce how to use PHP multi-threading to improve the processing efficiency and response time of API requests. 1. What is multithreading? multi-line
