Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance...
Transcript of Experiment 2: Performance Evaluationclouduv.cn/CnStufiles/exp2.pdf · Experiment 2: Performance...
![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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/1.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/2.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/4.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/5.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/6.jpg)
(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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/7.jpg)
(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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/8.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022051723/5ab40a097f8b9a0f058b7c32/html5/thumbnails/9.jpg)
Finally,wecanrunthetest.