Upload
lykhanh
View
216
Download
3
Embed Size (px)
Citation preview
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
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/
putthejarfileintolib/extdictionary,thenrestartJmeter.
Afterrestart,oneitemPluginsManagerisaddedintheoptionsdirectory,
Click enter Plugins Manager, we can see that there are some installed plugins andavailableplugins.
WechoosesomenewpluginsastheFigurebelowshown,thenapplychangesandrestart
jmeter.
4. Buildahttptestplan
Wecansavethetestplanandthenopenwiththejmxfile.(1) Addthreadgroup:AThreadGroupdefinesapoolofusersthatwillexecuteaparticular
testcaseagainstyourserver.
(2) Setthreadgroup
Wecansetloopcountorschedulertorunthethreadgroup.
(3) Addsample
(4) Sethttpsample
Hereweaccesstheindexpage.WeneedtosettheIP,portnumber,andpathasbelow.Youcanalsochoosetoaccesstheotherpages,forexampletheproductlistpage,whichisassociatedwithdatabasereading.
(5) Addlistener
Hereweaddlistenerasbelow.Theresultsoftestwillbeshowninfiguresandtables.
Youcanlearntheselistenersthroughhelpfile.
Also,theresultscanbestoredinfiles.Thetypeoffilescanbe.csvand.xmletc.Andtheitemsstoredinfilesarethoseshowninfigurebelow.Themeaningoftheseitemsarealsocanbefoundinhelpfile.
Finally,wecanrunthetest.