Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Architecture in Practice Practical Exercise in Performance Engineering.

Similar presentations


Presentation on theme: "Software Architecture in Practice Practical Exercise in Performance Engineering."— Presentation transcript:

1 Software Architecture in Practice Practical Exercise in Performance Engineering

2 Exercise 2 on the seminar day The purpose of exercise 2 on the seminar day is to establish the foundation for the mandatory project. This will be done by creating a “prototype” of the test architecture where the needed tools are installed and verified –JMeter is installed –JMeter-Plugins is installed –Loadosophia.org account created –TM12 server and database launched –PerfMon Server Agent started on relevant machines –Load the Test Plan handed out into JMeter and adapt to the test architecture (e.g. location of the processes, port numbers etc.) –Start the Test Plan in JMeter and conduct a test (at least 5 min.) During the test monitor for errors, cpu usage etc. –Stop test and upload test results to loadosophia.org –Access test report in loadosophia.org and make a quick analysis Hopefully most of you have already accomplished some of these tasks before the seminar

3 Exercise 2 on the seminar day You will work with the mandatory project in groups of 2. The ideal situation will be to execute TM12 and JMeter on 2 different machines –JMeter consumes many ressources and will impact the measured results You are however free to execute the performance test with all processes on the same machine, but you must consider this impact in the reporting of your test results

4 Optional: Looking inside the Java VM The test results collected by JMeter are considering the Java VM as a “black box” –It is only the external behaviour that is observed In case a JVM poses to be the problem you need to apply a “white box” perspective and look inside the JVM. This can be done by a JVM profiler. –jvisualvm from the JDK is a very easy-to-use tool for this Note! Using a profiler on your system will degrade performance and thereby impact your measurements –Therefore only use it when investigating the application – not in normal production

5 Backup slides

6 JMeter - Resource usage measurements

7 JMeter – Response time measurements

8 Loadosophia.org upload of results If you have inserted the token from your loadosophia.org account into the JMeter test plan your results will automatically be uploaded after the test

9 Loadosophia.org Test Reporting You can setup the test to automatically upload test results to your Loadosophia account after a test run. From the Loadasophia website you will then have access to all your test results – and can even compare KPI’s from test run to test run. Sample report included here:

10 Installation of JMeter 1.Go to http://jmeter.apache.orghttp://jmeter.apache.org 2.Go to “Download Releases” section and download latest binary version (e.g. zip-file) 3.Extract the zip-file and you have JMeter ready for use! 4.Open a command prompt 5.Setup relevant java environment (path and classpath) and navigate to jmeter\bin folder 6.Execute jmeter script file to launch JMeter GUI

11 Installation of JMeter-Plugins 1.Go to http://code.google.com/p/jmeter-plugins/downloads/list http://code.google.com/p/jmeter-plugins/downloads/list 2.Download newest release (zip-file) 3.Expand zip-file and copy JMeterPlugins.jar to \lib\ext 4.You are now ready to start using JMeter-Plugins More info here: –http://www.methodsandtools.com/tools/jmeterplugins.phphttp://www.methodsandtools.com/tools/jmeterplugins.php –http://code.google.com/p/jmeter-plugins/http://code.google.com/p/jmeter-plugins/

12 Loadosophia.org workspace creation 1.Ensure you have Google Account (which you have if you have gmail…) 2.Go to http://loadosophia.org/http://loadosophia.org/ 3.Follow instructions on front page to enter your personal work space 4.Create a new project called “TM12” 5.Issue an upload token through this link: https://loadosophia.org/service/upload/token/?utm_source=jpgc&ut m_medium=link&utm_campaign=wikitoken https://loadosophia.org/service/upload/token/?utm_source=jpgc&ut m_medium=link&utm_campaign=wikitoken 6.Insert this token into the JMeter Test Plan which has been handed out. More information available here: http://code.google.com/p/jmeter- plugins/wiki/LoadosophiaUploader?utm_source=jmeter&utm_medium =helplink&utm_campaign=LoadosophiaUploader

13 How to run the test 1. Ensure the PerfMon agent is started –From “serverAgent” subdirectory of JMeterPlugins installation directory invoke this command: startAgent –If port 4444 is in use you will get an error message. Either shut down other program or change port number (remember to change in JMeter Test Plan also) –You can see who is using port 4444 with “netstat –a” 2. Start mongo DB and TM12 server process 3. Start JMeter and load the TM12 Test Plan 4. Start the test by clicking green icon Lean back and observe the test progression –Observe for errors in both the TM12 server, JMeter and Mongo. Unexpected errors give false test results!! –When your test has run long enough stop by clicking the red icon in JMeter. The test results are now uploaded automatically to loadosophia.org CPU measurements are not uploaded to loadosophia. These you will have to include into report through screenshot + copying

14 Info for customizing JMeter Test Plan The TM12 Test Plan handed out in the class assumes the following –JMeter, JettyServer and Mongo DB run on localhost –PerfMon agent listens on UDP and TCP ports 4444 This can all be changed. To use automatic upload of your test results to loadosophia you need to generate a token in the web site and paste the key into the Test Plan. –By sharing the token several users can upload test results to the same loadosophia work area The patterns for recognizing the processes in the PerfMon Metrics Collector can be changed. –Please consult this page for the PTQL syntax http://support.hyperic.com/display/SIGAR/PTQL http://support.hyperic.com/display/SIGAR/PTQL –If you need to experiment to find the right pattern use the SIGAR shell documented in the link above (“java –jar sigar.jar” from the serverAgent sub-directory of JMeter-Plugins installation directory)

15 jvisualvm - 1 JVM’s on the machine. Double-click a JVM to monitor

16 jvisualvm - 2

17 jvisualvm - 3 Start of test


Download ppt "Software Architecture in Practice Practical Exercise in Performance Engineering."

Similar presentations


Ads by Google