The relationship between TPS and transaction response time

Source: Internet
Author: User

Example: A high-speed road with 10 entrances, each entrance can only be 1 vehicles per second

1. How many cars can I get in 1 seconds?    tps=102, how long does it take for each car to respond?    reponse time = 13, change to 20 cars, how few per second? How long is the response time for each car?    TPS = 10,reponse time = 14, ingress expands to 20, how few can I enter per second? How long is the response time for each car?    TPS = 20,reponse time = 15, see, now that the TPS has changed and response times have not changed, is there a relationship between TPS and response time?   Wood has a relationship 6, how to understand?   TPS and response time are rated in the ideal state, the entrance as a thread pool, if there are 20 entrances, concurrent number is only 10, the TPS is 10, and the response time is always 1, indicating that the concurrency is not enough, need to increase the number of concurrency to the peak of TPs. 7. Same as 20 entrances, what happens to TPS and response time if the concurrency number becomes 100?   Concurrent number to 100, there will be traffic jams, traffic jams on average each car in the past time is long, the 100 cars in 201 parts into 5 parts, the 5th part of the waiting time is the longest, from the waiting to start to this car into the actual cost of 5 seconds, the 100 cars are past response time is (5 +4+3+2+1)/5=3, the average TPS is (20/1+20/2+20/3+20/4+20/5)/5=8.89 (How I feel should be 100/(5+4+3+2+1) =6.67 Ah! 8, it can be concluded that TPS and response time is the inverse relationship on the macroscopic, but the actual wood has a direct relationship, in the above example, the system has only 20 threads, 100 of the concurrency will cause the thread to wait, resulting in an average response time from 1 seconds to 3 seconds, TPs from 20 to 9, TPS and response time are calculated separately, not each other!  9, also know, in the case that the concurrency is unchanged, how many ways to improve TPS?   A, increase the number of thread pools (ingress) B, reduce the time of entry for each vehicle (that is, increase the processing efficiency of a single thread)  10, see the difference between these 2 from the definition of TPS and response time?   TPS = the number of times each transaction passes, fails, and stops in each second that the scene or ashing step runs   that is, TPS = Total Pass, total number of failed transactions/run time of the entire scene;  reponse times = The number of times/transactions actually required for each transaction to complete   So, these 2 thingsIt's a wooden relationship! Another calculation method for TPS in   performance testing:

In the performance testing process, the development of a performance test program is a very important part, which will involve the development of some indicators, the most important indicator is TPS (processing transactions per second), which is used to measure the system's processing capacity of an indicator, followed by response time. Let's talk about how to define these two indicators in the actual work:

1, TPS indicators, can be selected in the production process in a year before the maximum value of a transaction in a day, and then in this day in minutes, List a time table, take the largest volume of one minute, and then use this volume divided by 60, this time can get TPS, Then multiply by 1.5 times times as the current TPS target, multiplied by another 1.5 or twice times in the second and third year;

2, response time, according to the characteristics of the business definition, plug-in transactions generally within 3 seconds.

The relationship between TPS and transaction response time

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.