当前位置:网站首页>How does the system response time and throughput change with the increase of concurrency pressure during performance pressure testing

How does the system response time and throughput change with the increase of concurrency pressure during performance pressure testing

2020-11-08 16:10:00 InfoQ

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Performance testing "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Performance testing is the premise and foundation of performance optimization , It is also a check and measure of performance optimization results . There are different standards for website performance from different perspectives , There are different ways to optimize ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Subjective perspective : The performance that users feel "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Load page ( Text before picture )"}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Objective perspective : Performance measures performance "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" When it comes to performance optimization , On the one hand, it can improve the performance index , On the other hand, we should consider improving the subjective feeling of users ( You can take advantage of asynchronous operations ). Architect training camp does not introduce a subjective perspective "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Performance test indicators "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Corresponding time RT"},{"type":"text","text":", Response Time"},{"type":"text","marks":[{"type":"strong"}],"text":":"},{"type":"text","text":" Time felt by users ( Client perspective ). The time required by the application system from the beginning of sending the request to receiving the final response data . Intuitively reflects the speed of the system "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Concurrency number :"},{"type":"text","text":" The number of requests that the system can process simultaneously , Load characteristics of the system . For websites , Concurrent number is the number of concurrent users in the system , Refers to the number of users who submit requests at the same time . Pay attention to the number of online users ( The number of users currently logged into the system ) And the number of system users ( The total number of users who may have access to the system ) The difference between . Generally speaking , The number of concurrency will not be too large , Taobao double 11 peak concurrency may be million level , The number of online users may reach 100 million at the same time , There could be more than a billion users ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" throughput :"},{"type":"text","text":" The number of requests processed by the system per unit time , The processing power of the system . For websites , Number of requests / second , Number of pages / second , Number of visitors / God , Number of transactions processed / Hours "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TPS, Transactions Per Second Transactions per second "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Performance counters :"},{"type":"text","text":" Data metrics that describe the performance of a server or operating system , Include System Load、 Number of objects and threads 、 Memory usage 、CPU Use 、 Disk and network I/O Equal index ."}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Other common indicators :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"RPS, Request Per Second: Requests per second "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"CPS, Codes Per Second:HTTP Return code per second "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PV, Page View: Page views "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"UV, Unique Vistor: Independent visitors "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IP, Internet Protocal: Independent IP Count "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IOPS, Input/Output Operations Per Second disk "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" throughput = ( 1000 / response time ms) × Concurrency number "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" throughput Throughput We need time units for our discussions , It is generally used Bytes/Second、Pages/Second and Request/Second Equal unit ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bytes/Second and Pages/Second Represents throughput , By network settings 、 Server architecture 、 Application services restrict "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Request/Second Represents throughput , Restricted by the application server and the application itself "}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" In different scenarios of concurrent users , Even if the system has similar throughput , But the system performance bottlenecks are different ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" such as 100 Concurrent users , Every user every 1 One second Request and 1000 Concurrent users , every other 10 One second Request, Both scenarios have the same throughput 100 Request/Second, But the two scenarios take up different resources , The inflection point of performance must be different ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/64/64b46f5c5bf0a8eafac37e39527e8602.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Performance test method "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/cb/cbb31c18a2833bd790338dd3374ce3a4.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Performance testing :"},{"type":"text","text":" Take the performance index planned in the initial stage of system design as the expected goal , Keep pressure on the system , Verify that the system is within the acceptable range of resources , Whether it can meet the performance expectations "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" The load test :"},{"type":"text","text":" Increasing concurrent requests to the system to increase system pressure , Until one or more performance indexes of the system reach the safety critical value , If a resource is already saturated , At this point continue to put pressure on the system , The processing power of the system can not be improved , It's going to go down ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Pressure test :"},{"type":"text","text":" When the safety load is exceeded , Continue to apply pressure to the system , Knowing that the system crashes or can no longer process any requests , Get the maximum pressure bearing capacity of the system at one time ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Stability test :"},{"type":"text","text":" On specific hardware 、 Software 、 Under the condition of network environment , Load some business pressure on the system , It's that the system has been running for a long time , To check whether the system is stable . In production environment , The pressure on requests is uneven , It's wavy , So in order to better simulate the production environment , The stability test should also apply uneven pressure to the system ."}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/d6/d64da9de2e53edfbd7258e4d92c3e489.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" How many servers are deployed ( resources ) More appropriate ? It's a decision that architects need to consider , Find performance 、 The equilibrium point of price . Architects should be aware of , What is the basis of the decision , What are the possible costs , Can we take this responsibility ……"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Free range :"},{"type":"text","text":" The number of concurrent users in the system is relatively small , Throughput is also low , The system is idle "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Linear growth interval :"},{"type":"text","text":" The overall load of the system is small , As the number of concurrent users grows , Throughput will grow linearly with it "}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Inflection point :"},{"type":"text","text":" The number of concurrent users of the system has further increased , The processing capacity of the system tends to be saturated , The response time of each user is getting longer ; The overall throughput of the system will not continue to grow linearly with the number of concurrent users ."}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":" Supersaturation interval :"},{"type":"text","text":" The number of concurrent users continues to grow , The processing capacity of the system is over saturated ; If you continue to increase the number of concurrent users , In the end, the response time for all users will be infinitely long ; The overall throughput of the system will drop to zero , The system is in a state of collapse ."}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/09/090869bca529d6cb5e1253bb403ca6b6.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Performance Testing Methodology, Quest Soft, 2005"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/a3/a3789ad63c8f9925a583ff4d32c78db9.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" stay TPS In the process of increasing , It's going to start with a lower response time , That is to say A Before the point . And then the response time began to increase a little bit , Until the point at which the business can afford B, At this time TPS There is still room for growth . And then increase the pressure , achieve C a.m. , Maximum TPS. We're going to increase the pressure , The response time then increases , but TPS There will be a decline ( Please note that , This is not necessarily , Some systems work well on queues , It's going to be stable TPS, Then all the more requests were turned down friendly ). Last , Response time is too long , Reached the point of overtime ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"——《02 Performance review :TPS And response time ?》 Performance test practice 30 speak "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" Generally, the requirement index of performance scenario is defined from two levels : Business indicators and technical indicators ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" All the technical indicators are formulated under the premise of business scenarios , And technical indicators and business indicators also need to have a detailed conversion process ."}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢