9
Experiment 2: Performance Evaluation Class Room: 55-A-210 Class Time: 2017/12/08 18:00-21:00 In this experiment, you will learn to evaluate the performance of online/offline cloud applications. Requirements: 1. The Mapreduce application (WordcountandSort) written in Experiment 1. 2. TPC-W: it is an e-commerce website, which supports online shopping and payment. 3. Apache Jmeter: it is a web-access load generator, and can be used to generate access load to TPC-W. Overview: 1. TPC-W has been installed successfully in your own virtual machine. The only thing you need to do is to start the service using the following command. root@VM-0-15-ubuntu: ~/tpcw/apache-tomcat-8.5.23/startup.sh Note: you need to change to root account using “sudo su -”, the startup.sh script is in directory of “/tpcw/apache-tomcat-8.5.23/”. 2. Install and configure Jmeter in your own PC (See attached Apache Jmeter manual). 3. Use Jmeter to access TPC-W, and get the response time distribution of your accesses. 4. Start your Mapreduce application. Measure the performance of TPC-W while mapreduce is still running. Then, get the response time distribution again. 5. Compare the two distributions of response times, and analyze their differences using figures and explain the reason. Apache Jmeter manual: 1. Download Apache Jmeter http://jmeter.apache.org/download_jmeter.cgi

Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

  • Upload
    lykhanh

  • View
    216

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Experiment2:PerformanceEvaluationClassRoom:55-A-210ClassTime:2017/12/0818:00-21:00Inthisexperiment,youwilllearntoevaluatetheperformanceofonline/offlinecloudapplications.

Requirements:

1. TheMapreduceapplication(WordcountandSort)writteninExperiment1.2. TPC-W:itisane-commercewebsite,whichsupportsonlineshoppingandpayment. 3. ApacheJmeter:itisaweb-accessloadgenerator,andcanbeusedtogenerateaccessloadto

TPC-W.

Overview:

1. TPC-Whasbeeninstalledsuccessfullyinyourownvirtualmachine.Theonlythingyouneedto

doistostarttheserviceusingthefollowingcommand.

root@VM-0-15-ubuntu:~/tpcw/apache-tomcat-8.5.23/startup.sh

Note:youneedtochangetorootaccountusing“sudosu-”,thestartup.shscriptisindirectoryof

“/tpcw/apache-tomcat-8.5.23/”.

2. InstallandconfigureJmeterinyourownPC(SeeattachedApacheJmetermanual).

3. UseJmetertoaccessTPC-W,andgettheresponsetimedistributionofyouraccesses.

4. StartyourMapreduceapplication.MeasuretheperformanceofTPC-Wwhilemapreduce is

stillrunning.Then,gettheresponsetimedistributionagain.

5. Comparethetwodistributionsofresponsetimes,andanalyzetheirdifferencesusingfigures

andexplainthereason.

ApacheJmetermanual:

1. DownloadApacheJmeterhttp://jmeter.apache.org/download_jmeter.cgi

Page 2: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Softwarepackage:apache-jmeter-3.3.zipDecompressfile:apache-jmeter-3.3

2. Doubleclicktoopensoftware:apache-jmeter-3.3\bin\jmeter.bat

3. PliginManagerDownload:https://jmeter-plugins.org/downloads/all/

Page 3: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

putthejarfileintolib/extdictionary,thenrestartJmeter.

Afterrestart,oneitemPluginsManagerisaddedintheoptionsdirectory,

Page 4: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Click enter Plugins Manager, we can see that there are some installed plugins andavailableplugins.

WechoosesomenewpluginsastheFigurebelowshown,thenapplychangesandrestart

jmeter.

4. Buildahttptestplan

Page 5: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Wecansavethetestplanandthenopenwiththejmxfile.(1) Addthreadgroup:AThreadGroupdefinesapoolofusersthatwillexecuteaparticular

testcaseagainstyourserver.

(2) Setthreadgroup

Wecansetloopcountorschedulertorunthethreadgroup.

Page 6: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

(3) Addsample

(4) Sethttpsample

Hereweaccesstheindexpage.WeneedtosettheIP,portnumber,andpathasbelow.Youcanalsochoosetoaccesstheotherpages,forexampletheproductlistpage,whichisassociatedwithdatabasereading.

Page 7: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

(5) Addlistener

Hereweaddlistenerasbelow.Theresultsoftestwillbeshowninfiguresandtables.

Page 8: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Youcanlearntheselistenersthroughhelpfile.

Also,theresultscanbestoredinfiles.Thetypeoffilescanbe.csvand.xmletc.Andtheitemsstoredinfilesarethoseshowninfigurebelow.Themeaningoftheseitemsarealsocanbefoundinhelpfile.

Page 9: Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance Evaluation Class Room: ... Download Apache Jmeter ... We can save the test plan and

Finally,wecanrunthetest.