Meaning of performance testing

(Learn to improve, get a raise!)

Industry status quo

  • The Internet industry has developed rapidly and the number of users has increased greatly
  • Business and system architectures are becoming more complex and data is increasing
  • Users are not only satisfied with the realization of functions, but also care about the experience of system performance

What is performance testing?

Through certain means, in the case of multi-concurrency, obtain the performance indicators of the system under test, verify the system under high concurrency processing ability, response ability, stability, etc., can meet expectations. Locate performance bottlenecks and potential performance risks to ensure system quality and improve user experience.

Which systems need performance testing? (Examples below)

  1. A system with a large number of users and high volume of traffic (PV)
  2. System core module/interface
  3. The business logic/algorithm is complex
  4. Promotion/event promotion plan
  5. New system, new project
  6. On-line performance problem validation and tuning
  7. New technology selection
  8. Capacity evaluation and planning
  9. Daily system performance regression

What are the performance test metrics?

Performance test counters – TPS

Transactions: In the field of performance testing, the performance of a system is measured mainly by how much traffic the system can handle per unit of time. The services of each system are different. Unified indicators are used to measure service performance. Business operations are represented by transactions. A transaction can represent one business or multiple business operations. Transactions are user-defined, and if you want to test the performance of any business, you add that business to the transaction.

  • TPS/QPS: Transaction Per Second Number of transactions processed Per Second
  • TPS: The number of requests processed per unit of time by the system (closed loop request time for all associated services)
  • QPS: Query rate per second QPS is a measure of how much traffic is being processed by a particular query server over a specified period of time (equivalent to the time it takes to query an SQL field)

Performance test metrics – Average response time

What are the response times of a request?

  • Response time = Total network transmission time + component service processing time
  • Average response time: The average time taken by all requests during testing

Performance test indicator – TOP response time

TOP Response time: Sorts the response time of all requests from highest to lowest and calculates the proportion of requests that are less than a certain time. This metric measures the time taken for most requests.

  • Tp90 (90% response time) : 90% of requests take less than a certain time
  • Tp95 (95% response time) : 95% of requests take less than a certain time
  • Tp99 (99% response time) : 99% of requests take less than a certain time

Performance test indicators

  • Concurrent users/Virtual Users (Vuser) Indicates the number of concurrent threads or processes set in the pressure test tool
  • Success rate, (request success rate)
  • PV Page View (PV) Page View volume
  • UV (Unique Visitor) Daily Unique Visitor to the page/interface
  • Throughput (Total upstream and downstream traffic in the network. Throughput represents network traffic. The higher THE TPS, the greater the throughput.)

TPS, response time, and concurrency

TPS is proportional to the number of concurrent requests until the system reaches a performance bottleneck.

Response time in seconds:

  • TPS = 1 / response time x number of concurrent requests
  • TPS = Concurrency/response time

Performance Monitoring Indicators

  • Operating system-level monitoring: CPU usage, memory usage, network IO (input/ Output), disk (read/write/util)
  • Middleware monitoring: number of connections, long and short connections, memory usage
  • Application layer monitoring: thread state, JVM parameters, GC frequency, locks
  • DB layer monitoring: connection count, locks, cache, memory, SQL efficiency