How to performance test, the analysis of the number of concurrent

First, the problem:

If we do performance testing, concurrency need to consider this issue, the concurrent performance testing is a very important one, if there is no concurrent can not be tested
, then, how to analyze the amount of concurrency, in order to meet the actual demands? Or, how to find out the exact number of concurrent systems it?

Second, examples:

If we have the following systems, the need for performance testing
2.1 Example 1 ,
if a system mall, there will be 100 million people visit the center every day products, this will amount 1 million PV. But on the actual business, there are 3,000 people click on the merchandise, then the amount of concurrency is 3000,
calculated : the first statistics of a project day PV amount, if PV is one million, the actual user activity is 8 hours, using the formula PV / hours / minutes / seconds . Calculated [1000000/8 hours / 60 minutes / 60 seconds = 34} is the average amount of concurrency, more accurate if desired, may be taken concurrently find all days of a particular month average analysis, the average number of concurrent determined.
If the calculated average concurrency is 34, but some time will have a peak concurrency of 1000

2.2 Example 2
a punch card system to work, 8:00 to 9:00 is the peak time of 1 hour. The company has 2,000 people, maybe 100 people at the same punch

2.3 Example 3
grab function red, an active end Po, 100 million users simultaneously grab envelopes time of 2 minutes
is calculated as the number of concurrent [100 million people / 2 min / 60 sec / 834] = 1000 msec milliseconds

Third, the analysis:

1, the number of concurrent, we canAverage ConcurrentwithMaximum number of concurrentAnalysis calculated two directions

2, the inlet and outlet distinguish concurrent (such as the system log in and out),I.e., the inlet to consider the peak maximum number of concurrent, Exports need to consider peak

3, the number of concurrent simulation tests, generally higher than the actual number of concurrent testing

4, concurrent with the second or millisecond unit generally, if the system is complicated by long time, like the punch, can be employed as the second unit, if a relatively short period of time concurrently, grab as red, can be employed as a unit of milliseconds

5, in fact a million level of concurrent performance testing, concurrency is very big, we can not be a one-time set all aspects of the test, such as the servers are not necessarily user-level simulation ten thousand to withstand such a large concurrent

6, we want actual business platform and PV statistics, calculate the average and maximum number of concurrent concurrent. Then divide stage tests, such as the user level is set to 500,1000,3000,8000,10000 such concurrency, gradually increase the amount of concurrency

7, on the system performance test, if the conditions, and generally produced individually isolated as a physical test environment, and is not sure that the test limit network problems, the server machine and the need to initiate a LAN

Published 222 original articles · won praise 4 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_42976139/article/details/104490923