The relationship between TPS and transaction average response time

Source: Internet
Author: User

Q: What is the relationship between the number of transactions processed per second and the average response time of a transaction?

Kaku21: For example: A high-speed road has 10 entrances, each entrance can only enter 1 vehicles per second, can you tell me the maximum number of cars in 1 seconds??

Asked by: 10

kaku21: How long does it take for each car to respond??

Q: For this question, the TPS is 10, and the response time for the transaction is 1.

Kaku21: Well, now I have 20 cars, and how few can I get in a second? What is the response time per vehicle??

Asked by: ... In thinking

Kaku21: Every second or 10 cars, each car or 1 seconds response Ah

Q: Yes

Kaku21: Go on, now IExpand the entrance to 20, then I ask you, how many cars per second?? How long does each car respond??

Asked by: 20 1

Kaku21: Okay, now TPS has changed,response time has not changed, then I ask you TPS and response time What is the relationship??

Q: It's okay.

Kaku21:TPS and response times are rated in an ideal state, and you think of the entry as a thread pool. If there are 20 entrances, and the number of concurrent numbers is only 10, the TPS is 10, and the response time is always 1, indicating that concurrency is not enough and that the concurrency is increased to the peak of TPs.

Q: The same is 20 entrances, concurrent number is 100, TPS is 20, response time or 1?
What happens when the response time is greater than 1 seconds

Kaku21: I ask you, when the concurrent quantity is 100, what will happen??

Q: Traffic jams ... Oh, the traffic jam. On average, how long has the car gone?

Kaku21: Traffic jams Plainly is there is a car waiting, now put 100 by 20 divided into 5 parts, the 5th waiting time is the longest, from waiting to start to this car into the actual cost of how long??

Asked by: 5 seconds.

Kaku21: So what is the average response time of 1002 cars?

Q: 5 divided by 100? 0.05?

Kaku21: Wrong,calculate with simple mathematical logic (5+4+3+2+1)/5=3 that's the average response time.

Do you understand me? Then ask you, what is the average TPS for 1002 cars??


Asked by: 20?

Kaku21: Wrong (20/1+20/2+20/3+20/4+20/5)/5 approximately equal to 8.8999

Q: The front TPS is still 20, and the size of the TPS is small. 20 is the peak of TPs?

Kaku21: Response time and TPS are inversely proportional to each other, but there is no direct relationship between the two

Kaku21:20 is a concurrent number, 100 of the concurrency causes the thread to wait, causing the average response time from 1 seconds to 3 seconds, of course, TPS also dropped from 20 to 9; Both TPS and response time are calculated separately, and they are not calculated from each other.

The relationship between TPS and transaction average response time (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.