system throughput

The throughput (pressure capacity) of a system is closely related to the CPU consumption of requests, external interfaces, IO, and so on. The higher the CPU consumption of a single reqeust, the slower the external system interface and IO are affected. The lower the system throughput, the higher the vice versa.

Several important parameters of system throughput: QPS (TPS), concurrent number, response time

        QPS (TPS): number of requests/transactions per second

        Concurrency: The number of requests/transactions processed by the system at the same time

        Response time: generally take the average response time

(Many people often confuse concurrency with TPS understanding)

After understanding the meaning of the above three elements, you can calculate the relationship between them:
QPS (TPS) = number of concurrent / average response time or number of concurrent = QPS * average response time


        A typical work check-in system, going to work at 8:00 in the morning. During the 30 minutes from 7:30 to 8:00, the user will log in to the sign-in system to sign in. The company has 1,000 employees, and the average time for each employee to log in to the system is 5 minutes. It can be calculated by the following method.


QPS = 1000/(30*60) transactions/second
Average response time = 5*60 seconds
Concurrency = QPS*Average response time = 1000/(30*60) *(5*60)=166.7

        The throughput of a system is usually determined by two factors, QPS (TPS) and the number of concurrency. Each system has a relative limit for these two values. Under the access pressure of application scenarios, only a certain item needs to reach the highest value of the system. The throughput of the system will not go up, assuming the pressure continues to increase. On the contrary, the throughput of the system will decrease. The reason is that the system is overloaded, context switching, memory and other consumption cause system performance to degrade.

 

Determining System Response Time Elements

When we do a project, we need to schedule a plan. We can have multiple people doing multiple tasks concurrently at the same time, or one or more people can work in series. There will always be a critical path, and this path is the project duration.

The response time of a system call is the same as the project plan. There is also a critical path. This critical path is the system response time.

The critical path is composed of CPU operations, IO, external system responses, and so on.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325842827&siteId=291194637