Skip to content

Step by step installation of Apache Jmeter for distributed stress test

Notifications You must be signed in to change notification settings

mmalnati/jmeter-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Configuration and installation of Apache Jmeter 3.3

Install Debian 8.8.0 (In nodes maester and slave)

  • apt-get update
  • apt-get upgrade

Install Java

  • apt-get install software-properties-common
  • add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
  • apt-get update
  • apt-get install oracle-java8-installer
  • javac -version
  • update-alternatives --config java
  • echo 'JAVA_HOME="/usr/lib/jvm/java-8-oracle"' >>/etc/environment
  • source /etc/environment
  • echo $JAVA_HOME

Model of the distributed stress test Apache Jmeter 3.3

Install Apache Jmeter 3.3 (both nodes)

  • wget http://apache.dattatec.com//jmeter/binaries/apache-jmeter-3.3.tgz
  • tar zxvf apache-jmeter-3.3.tgz
  • mv apache-jmeter-3.3 jmeter-3.3
  • jmeter-3.3/bin/jmeter –version

Edit the master node. The file is located in /jmeter-3.3/bin/jmeter.properties and in the section remote_hosts add the ip adress of the slave nodes.

Install the library so you can execute the Apache Jmeter in graphical mode (X11) (master node only)

  • apt-get install libxtst6

Tunning of Jmeter

Edit the file and change the value

  • vi /root/jmeter-3.3/bin/jmeter
  • HEAP="-Xms512m -Xmx6144m"

Tunning Debian(both master and slave nodes)

Change in sysctl

Check the values in ip_local_port_range and then we change it

  • cat /proc/sys/net/ipv4/ip_local_port_range= 32768 61000
  • net.ipv4.ip_local_port_range = 10000 65000
  • sysctl -p

Edit the file /etc/hosts (master node only)

127.0.0.1 localhost
192.168.1.101  str1 stresstest-app01 stresstest-prod-app01
192.168.1.102  str2 stresstest-app02 stresstest-prod-app02
192.168.1.103  str3 stresstest-app03 stresstest-prod-app03
192.168.1.104  str4 stresstest-app04 stresstest-prod-app04
192.168.1.105  str5 stresstest-app05 stresstest-prod-app05
192.168.1.106  str6 stresstest-app06 stresstest-prod-app06

Delete rpcbind package

  • apt-get --purge remove rpcbind

Disable snmpd

  • systemctl stop snmpd
  • systemctl disable snmpd

Delete dependencies not used

  • apt-get --purge autoremove

Distributed load in JMeter

Start the slave nodes in server mode

  • cd /jmeter-3.3/bin/
  • ./jmeter-server

In the graphical mode, generate the .jmx file for the test plan, save it, close the aplication, and then run the following command:

./jmeter.sh -n -t /root/test-plan/plan_test.jmx -l /root/results.jtl -j /root/runlog.log -r

  • -n --nongui: run JMeter in console mode
  • -t --testfile <argument>: this is the file with the extension .jmx that will use for the test
  • -l --logfile <argument>: this file will save the log samples (.jtl)
  • -j --jmeterlogfile <argument>: generate a log file (.log)
  • -r --runremote: start the remote nodes (as was defined in the remote_hosts)

Once it is finished, run the graphical mode, create a Listener “Summary Report” to load the .jtl file, so you can analize the results.

About

Step by step installation of Apache Jmeter for distributed stress test

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published