Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Performance testing-JMeter installation environment and operation principle

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

JMeter environment requirements

JMeter is a pure Java application, so there are requirements for the Java runtime environment. Different versions

JMeter has different requirements for Java versions. For example:

JMeter3.3 only supports Java 8

JMeter4.0 requires Java 8 + (indicates greater than or equal to Java 8 version)

JMeter5.1.1 requires Java 8 +

The Java version generally refers to the JDK version, and the two concepts can be treated indiscriminately. Current JDK

It can be divided into two categories: Oracle JDK and Open JDK, where Open JDK is Oracle

The open source free version of JDK.

From January 2019, LTS's Oracle JDK8 and Oracle JDK11 are no longer free. If enterprises need to get updates and upgrades of JDK, they need to purchase Orace subscription services. You can also use the free Open JDK 8 take 11 without paying for it. There is not much difference between the two.

Operation principle of JMeter

JMeter simulates multiple users to perform operations by creating multiple threads, with one thread representing a virtual user. When JMeter executes the test, the test plan is sent to the loader, and commands are sent to the loader to execute the test in CLI mode, resulting in multiple threads sending requests to the system under test to generate load.

Based on the mode of operation, it can be divided into two types:

GUI mode

Graphical user interface operation mode. The visual display is more intuitive, and it is more convenient to use the mouse.

CLI mode

Command line mode (formerly known as NON GUI).

There are the following problems with using GUI mode:

1) GUI mode will consume a lot of system resources when running, which will affect the test results.

2) the GUI pattern may not be available in some environments, such as deploying JMeter on a Linux system without GUI.

To circumvent these problems, JMeter provides the CLI mode, which allows tests to be executed by running the JMeter command.

It is recommended that you use GUI mode to create and debug test scripts; use CLI mode to execute tests and collect test results.

Based on the running architecture, it can be divided into two types:

Stand-alone mode

JMeter is installed on a server, which is also a loader, from which all requests are made

Distributed mode

There are the following problems with stand-alone mode:

1) when JMeter is running, many threads will consume a lot of CPU and memory resources, and the loader itself may become the bottleneck of testing.

2) the amount of data that can be transmitted on the network is affected by the network bandwidth, which can not achieve high concurrency, resulting in inaccurate test results.

These problems can be solved by using a distributed mode, using a Master to control multiple remote Slave, distributing test plans to different Slave for execution, and sending requests from different Slave.

Distributed operation principle

JMeter distributed architecture

JMeter distributed execution Test process

1. Start the Agent program on each Slave first

Windows: jmeter-server.bat,Linux/Unix: jmeterserver

two。 Automatically connect each remote Slave after starting Master

3.Master distributes the local test plan (jmx file) to each remote Slave and commands each Slave to execute the JMeter test in CLI mode

Note: parameterized files or dependent packages need to be manually copied to each remote Slave

4.Slave executes the test to send a request to SUT (the system under test) and accepts the response result returned by the server

5.Slave sends the test results back to Master

6.Master receives and summarizes the statistical test results.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report