JMeter做WEB性能测试的Remote Invoke方法及配置
2010-06-28 22:35
489 查看
Please according as the following steps to set up tools and environment. 15. Remote Testing | ||||||||||||
In the event that your JMeter client machine is unable, performance-wise, to simulate enough users to stress your server, an option exists to control multiple, remote JMeter engines from a single JMeter GUI client. By running JMeter remotely, you can replicate a test across many low-end computers and thus simulate a larger load on the server. One instance of the JMeter GUI client can control any number of remote JMeter instances, and collect all the data from them. This offers the following features: Saving of test samples to a local machine Managment of multiple JMeterEngines from a single machine However, remote mode does use more resources than running the same number of non-GUI tests independently. If many server instances are used, the client JMeter can become overloaded, as can the client network connection. Note that while you can execute the JMeterEngine on your application server, you need to be mindful of the fact that this will be adding processing overhead on the application server and thus your testing results will be somewhat tainted. The recommended approach is to have one or more machines on the same Ethernet segment as your application server that you configure to run the JMeter Engine. This will minimize the impact of the network on the test results without impacting the performance of the application serer itself. Step 1: Start the servers To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the JMETER_HOME/bin/jmeter-server (unix) or JMETER_HOME/bin/jmeter-server.bat (windows) script. Note that there can only be one JMeter server on each node unless different RMI ports are used. Since JMeter 2.3.1, the JMeter server application starts the RMI registry itself; there is no need to start RMI registry separately. To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems. By default, RMI uses a dynamic port for the JMeter server engine. This can cause problems for firewalls, so versions of JMeter after 2.3.2 will check for the JMeter property server.rmi.localport . If this is non-zero, it will be used as the local port number for the server engine. Step 2: Add the server IP to your client's Properties File Edit the properties file on the controlling JMeter machine . In /bin/jmeter.properties, find the property named, "remote_hosts", and add the value of your running JMeter server's IP address. Multiple such servers can be added, comma-delimited. Note that you can use the -R command line option instead to specify the remote host(s) to use. This has the same effect as using -r and -Jremote_hosts={serverlist}. E.g. jmeter -Rhost1,127.0.0.1,host2 If you define the JMeter property server.exitaftertest=true, then the server will exit after it runs a single test. See also the -X flag (described below) Step 3a: Start the JMeter Client from a GUI client Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat". For UNIX, use the script "bin/jmeter". You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" (see figure 1). These menus contain the client that you set in the properties file. Use the remote start and stop instead of the normal JMeter start and stop menu items.
As an alternative, you can start the remote server(s) from a non-GUI (command-line) client. The command to do this is: jmeter -n -t script.jmx -r or jmeter -n -t script.jmx -R server1,server2... Other flags that may be useful: -Gproperty=value - define a property in all the servers (may appear more than once) -Z - Exit remote servers at the end of the test. The first example will start whatever servers are defined in the JMeter property remote_hosts; the second example will define remote_hosts from the list of servers and then run the remote servers. The command-line client will exit when all the remote servers have stopped.
|
相关文章推荐
- Jmeter进行性能测试时多台负载机的配置方法
- Jmeter进行性能测试时多台负载机的配置方法
- Jmeter进行性能测试时多台负载机的配置方法
- Spring MVC Junit测试实例 附:读取WEB-INF下配置文件的方法
- 使用JMeter进行Web 性能测试 - 基本操作
- web应用性能测试-Tomcat 7 连接数和线程数配置
- (Jmeter 三)JMETER+WEBSERVICE性能测试
- nmon-监控测试服务器 - Jmeter - 在Linux执行性能测试的方法 [2]
- 使用JMeter进行Web 性能测试 - 检查点、关联和参数化
- 利用Spring Insight + JMeter 对Web应用进行压力测试和性能评估
- 使用Jmeter进行Web站点性能测试实例
- [Jmeter]jmeter数据库性能测试配置
- 使用Jmeter测试MySQL性能——(1)连接配置
- Web性能测试和CC攻击和方法和防范
- Spring MVC Junit测试实例 附:读取WEB-INF下配置文件的方法
- 02.零成本实现WEB性能测试-基于APACHE JMETER
- 【转】Apache JMeter web性能测试实例
- Jmeter之Web端HTTP性能测试(九)
- 使用Jmeter测试MySQL性能——(2)多客户端配置
- 性能测试之工具对比-ngrinder jmeter loadunner及ngrinder安装使用方法