In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
As a pure JAVA GUI application, JMeter consumes a lot of CPU and memory, so when you need to simulate thousands of concurrent users, it is somewhat inadequate to use a single machine to simulate all concurrent users, and even cause JAVA memory overflow errors.
However, like LoadRunner, JMeter can also share the pressure on the load generator itself by using multiple machines to run so-called agents, and thus obtain a larger number of concurrent users, which we only need to configure manually.
1. Install JMeter on all machines that are expected to run JMeter as a load generator, and identify one machine as the controller and the other machines as the agent. In the following example, we use the windows server as the controller and the other two linux servers as proxies.
Then run the JMeter-server.bat file on all agent machines (run Jmeter-server on the linux server)
Suppose we use two machines, 172.16.129.155 and 172.16.129.43, as agents.
2. Operation on the windows machine controlled by Controller:
Find the bin directory in the JMeter installation directory of the Controller control machine, find the file jmeter.properties, and open it using notepad or other text editing tools
Look for the string "remote_hosts=" in the open file and find the line "remote_hosts=127.0.0.1". Where 127.0.0.1 represents the machine running the JMeter agent, modify it to the ip address of the slave agent machine we need to use plus the default port number 1099: here you need to change it to
Remote_hosts=172.16.129.155:1099172.16.129.43:1099 (used between two proxy servers, separated)
Then remove the previous comments (#) from the following items:
Server_port=1099
Client.rmi.localport=0
Server.rmi.port=1234
Server.rmi.localport=1099
Then save the file.
Find the bin directory in the JMeter installation directory of the Controller control machine, then find the file jmeter.bat, and open it using notepad and other text editing tools
New set rmi_host=-Djava.rmi.server.hostname= native ip (controller ip)
Modify
Set ARGS=%DUMP% HEAP% NEW% SURVIVOR% TENURING% PERM% DDRAW% rmi_host%
And save it.
3. Operations on the linux server as a proxy server:
Modify the jmeter-server file in the bin directory
Get rid of #
RMI_HOST_DEF=-Djava.rmi.server.hostname=172.16.129.155
(avoids the occurrence of two ip in the virtual machine)
PS:
The hostname in the proxy server and the hostname corresponding to the ip address in / etc/hosts should be the same.
And save it.
The jmeter environment variable needs to be added to the distributed test agent machine:
Command vim / etc/profile
Insert
At the end of the document, add:
Export PATH= "/ jmeter/apache-jmeter-2.12/bin:$PATH"
Esc: w q
Save, exit, and then run:
# source / etc/profile
If you don't report a mistake, you will succeed.
Run the env command to check all the environment variables to see if the jmeter environment is installed successfully. (or enter the jmeter-v command)
(on windows, it is equivalent to adding the user variable JMETER_HOME=d:\ jmeter, and adding d:\ jmeter\ bin to the path in the system variable. )
Enter the command in the bin directory
Chmod 777 jmeter-server
Chmod 777 jmeter
Prevent permission to prohibit denied
4. Make sure that the proxy server can ping to the machine of the interface you need to test, and then enable jmeter-server on all proxy servers
The figure shows the successful startup of jmeter-server on the proxy server.
Start JMeter on the controller machine and enter Startup-> remote Startup menu item. You will see the addresses of the two agents we just added, select and run them. If you want to start all agents at the same time, select remote to start them all.
The jmeter on the controller will receive instructions
Instructions on the agent machine to start and complete the test
5. pay attention to the results
The response data for the results in the JMeter remote startup test is empty because:
In distributed testing, by starting the proxy server remotely, the focus is on high concurrency. By default, the response data in the result tree is empty, and only error messages will be reported.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.