Technology Sharing

Jmeter continuous learning -- some basic concepts and indicators of performance

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Why do we need to perform performance testing on the server side?

Can the system run stably under a large number of users (more)

For hardware server selection

For selection of software technology

Performance testing focus

User perspective: response time

Resource usage: number of concurrent users, TPS, resource usage (cpu, memory, JVM)

Performance Testing Strategy

Benchmark test: Single-user test, conduct separate tests on important services in the business model to obtain various performance indicators when a single user is running

Load testing: testing the changes in system performance by gradually increasing the load, and ultimately determining the maximum load the system can withstand while meeting system performance indicators.

Stability test: long-term testing when the server is stable

Common performance indicators

Response time, concurrency, throughput, error rate, resource utilization

Throughput (QPS, TPS)

QPS: The number of requests processed by the server per second (that is, the server interface)

TPS: The number of client requests processed by the system per unit time (one operation on the interface, one request or multiple requests)

Error rate

The probability of failed services when the system is under load. Error rate = (number of failed services/total number of services)*100%

Generally no more than 1 in 10,000 (as specified by the company)

The error rate of a system with better stability should be caused by timeout.

Resource Utilization

It is recommended that the CPU should not exceed 80% (plus or minus 5)

Memory is no more than 80%

Disk is not higher than 90%

jmeter

LoadRunner: An industrial-grade standard performance load test that can simulate tens of thousands of users to implement tests

Jmeter is free and can provide basically the same functions as LoadRunner, meeting the needs of most companies.

Directory structure of jmeter

bin

docs

printable_docs

Basic elements and components of JMeter

The first request sent by jmeter

Start jmeter

Add a thread group under the test plan

Add http request and sampler under thread group

Fill in the relevant request data of the http request

Add View Results Tree and Listener under Thread Group

Click the Start button to run and view the results

Set a high number of concurrent users