计算机专业文献翻译性能测试方法.docx

上传人:b****5 文档编号:4255836 上传时间:2022-11-28 格式:DOCX 页数:17 大小:1.25MB
下载 相关 举报
计算机专业文献翻译性能测试方法.docx_第1页
第1页 / 共17页
计算机专业文献翻译性能测试方法.docx_第2页
第2页 / 共17页
计算机专业文献翻译性能测试方法.docx_第3页
第3页 / 共17页
计算机专业文献翻译性能测试方法.docx_第4页
第4页 / 共17页
计算机专业文献翻译性能测试方法.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

计算机专业文献翻译性能测试方法.docx

《计算机专业文献翻译性能测试方法.docx》由会员分享,可在线阅读,更多相关《计算机专业文献翻译性能测试方法.docx(17页珍藏版)》请在冰豆网上搜索。

计算机专业文献翻译性能测试方法.docx

计算机专业文献翻译性能测试方法

 

届毕业设计(论文)

英文参考文献

 

英文文献1:

DatabaseSecurity

文献出处,年,Vol.卷(期)NetworkSecurityVolume:

2003,Issue:

6,June,2003,pp.11-12

作者:

PaulMorrison

英文文献2:

ApproachestoPerformanceTesting

文献出处,年,Vol.卷(期)ApproachestoPerformanceTestingVol.18,No.3,pp.312-319,2000

作者:

MattMaccaux

学生院系

专业名称学生班级

学生学号学生姓名

学生层次

ApproachestoPerformanceTesting

byMattMaccaux

09/12/2005

Abstract

Therearemanydifferentwaystogoaboutperformancetestingenterpriseapplications,someofthemmoredifficultthanothers.Thetypeofperformancetestingyouwilldodependsonwhattypeofresultsyouwanttoachieve.Forexample,forrepeatability,benchmarktestingisthebestmethodology.However,totesttheupperlimitsofthesystemfromtheperspectiveofconcurrentuserload,capacityplanningtestsshouldbeused.Thisarticlediscussesthedifferencesandexaminesvariouswaystogoaboutsettingupandrunningtheseperformancetests.

Introduction

PerformancetestingaJ2EEapplicationcanbeadauntingandseeminglyconfusingtaskifyoudon'tapproachitwiththeproperplaninplace.Aswithanysoftwaredevelopmentprocess,youmustgatherrequirements,understandthebusinessneeds,andlayoutaformalschedulewellinadvanceoftheactualtesting.Therequirementsfortheperformancetestingshouldbedrivenbytheneedsofthebusinessandshouldbeexplainedwithasetofusecases.Thesecanbebasedonhistoricaldata(say,whattheloadpatternwasontheserverforaweek)oronapproximationsbasedonanticipatedusage.Onceyouhaveanunderstandingofwhatyouneedtotest,youneedtolookathowyouwanttotestyourapplication.

Earlyoninthedevelopmentcycle,benchmarktestsshouldbeusedtodetermineifanyperformanceregressionsareintheapplication.Benchmarktestsaregreatforgatheringrepeatableresultsinarelativelyshortperiodoftime.Thebestwaytobenchmarkistochangeoneandonlyoneparameterbetweentests.Forexample,ifyouwanttoseeifincreasingtheJVMmemoryhasanyimpactontheperformanceofyourapplication,incrementtheJVMmemoryinstages(forexample,goingfrom1024MBto1224MB,thento1524MB,andfinallyto2024MB)andstopateachstagetogathertheresultsandenvironmentdata,recordthisinformation,andthenmoveontothenexttest.Thiswayyou'llhaveacleartrailtofollowwhenyouareanalyzingtheresultsofthetests.Inthenextsection,Idiscusswhatabenchmarktestlookslikeandthebestparametersforrunningthesetests.

Lateroninthedevelopmentcycle,afterthebugshavebeenworkedoutoftheapplicationandithasreachedastablepoint,youcanrunmorecomplextypesofteststodeterminehowthesystemwillperformunderdifferentloadpatterns.Thesetypesoftestsarecalledcapacityplanning,soaktests,andpeak-resttests,andaredesignedtotest"real-world"-typescenariosbytestingthereliability,robustness,andscalabilityoftheapplication.ThedescriptionsIusebelowshouldbetakenintheabstractsensebecauseeveryapplication'susagepatternwillbedifferent.Forexample,capacity-planningtestsaregenerallyusedwithslowramp-ups(definedbelow),butifyourapplicationseesquickburstsoftrafficduringaperiodoftheday,thencertainlymodifyyourtesttoreflectthis.Keepinmind,though,thatasyouchangevariablesinthetest(suchastheperiodoframp-upthatItalkabouthereorthe"think-time"oftheusers)theoutcomeofthetestwillvary.Itisalwaysagoodideatorunaseriesofbaselinetestsfirsttoestablishaknown,controlledenvironmenttocompareyourchangeswithlater.

Benchmarking

Thekeytobenchmarktestingistohaveconsistentlyreproducibleresults.Resultsthatarereproducibleallowyoutodotwothings:

reducethenumberoftimesyouhavetorerunthosetests;andgainconfidenceintheproductyouaretestingandthenumbersyouproduce.Theperformance-testingtoolyouusecanhaveagreatimpactonyourtestresults.Assumingtwoofthemetricsyouarebenchmarkingaretheresponsetimeoftheserverandthethroughputoftheserver,theseareaffectedbyhowmuchloadisputontotheserver.Theamountofloadthatisputontotheservercancomefromtwodifferentareas:

thenumberofconnections(orvirtualusers)thatarehittingtheserversimultaneously;andtheamountofthink-timeeachvirtualuserhasbetweenrequeststotheserver.Obviously,themoreusershittingtheserver,themoreloadwillbegenerated.Also,theshorterthethink-timebetweenrequestsfromeachuser,thegreatertheloadwillbeontheserver.Combinethosetwoattributesinvariouswaystocomeupwithdifferentlevelsofserverload.Keepinmindthatasyouputmoreloadontheserver,thethroughputwillclimb,toapoint.

Figure1.Thethroughputofthesysteminpagespersecondasloadincreasesovertime

Notethatthethroughputincreasesataconstantrateandthenatsomepointlevelsoff.

Atsomepoint,theexecutequeuestartsgrowingbecauseallthethreadsontheserverwillbeinuse.Theincomingrequests,insteadofbeingprocessedimmediately,willbeputintoaqueueandprocessedwhenthreadsbecomeavailable.

Figure2.Theexecutequeuelengthofthesystemasloadincreasesovertime

Notethatthequeuelengthiszeroforaperiodoftime,butthenstartstogrowataconstantrate.Thisisbecausethereisasteadyincreaseinloadonthesystem,andalthoughinitiallythesystemhadenoughfreethreadstocopewiththeadditionalload,eventuallyitbecameoverwhelmedandhadtostartqueuingthemup.

Whenthesystemreachesthepointofsaturation,thethroughputoftheserverplateaus,andyouhavereachedthemaximumforthesystemgiventhoseconditions.However,asserverloadcontinuestogrow,theresponsetimeofthesystemalsogrowsevenasthethroughputplateaus.

Figure3.Theresponsetimesoftwotransactionsonthesystemasloadincreasesovertime

Notethatatthesametimeastheexecutequeue(above)startstogrow,theresponsetimealsostartstogrowatanincreasedrate.Thisisbecausetherequestscannotbeservedimmediately.

Tohavetrulyreproducibleresults,thesystemshouldbeputunderahighloadwithnovariability.Toaccomplishthis,thevirtualusershittingtheservershouldhave0secondsofthink-timebetweenrequests.Thisisbecausetheserverisimmediatelyputunderloadandwillstartbuildinganexecutequeue.Ifthenumberofrequests(andvirtualusers)iskeptconsistent,theresultsofthebenchmarkingshouldbehighlyaccurateandveryreproducible.

Onequestionyoushouldraiseis,"Howdoyoumeasuretheresults?

"Anaverageshouldbetakenoftheresponsetimeandthroughputforagiventest.Theonlywaytoaccuratelygetthesenumbersthoughistoloadalltheusersatonce,andthenrunthemforapredeterminedamountoftime.Thisiscalleda"flat"run.

Figure4.Thisiswhataflatrunlookslike.Alltheusersareloadedsimultaneously.

Theoppositeisknownasa"ramp-up"run.

Figure5.Thisiswhataramp-uprunlookslike.Theusersareaddedataconstantrate(xnumberpersecond)throughoutthedurationofthetest.

Theusersinaramp-uprunarestaggered(addingafewnewuserseveryxseconds).Theramp-uprundoesnotallowforaccurateandreproducibleaveragesbecausetheloadonthesystemisconstantlychangingastheusersarebeingaddedafewatatime.Therefore,theflatrunisidealforgettingbenchmarknumbers.

Thisisnottodiscountthevalueinrunningramp-up-styletests.Infact,ramp-uptestsarevaluableforfindingtheballparkinwhichyouthinkyoulaterwanttorunflatruns.Thebeautyofaramp-uptestisthatyoucanseehowthemeasurementschangeastheloadonthesystemchanges.Thenyoucanpicktherangeyoulaterwanttorunwithflattests.

Theproblemwithflatrunsisthatthesystemwillexperience"wave"effects.

Figure6.Thethroughputofthesysteminpagespersecondasmeasuredduringaflatrun

Notetheappearanceofwavesovertime.Thethroughputisnotsmoothbutratherresemblesawavepattern.

ThisisvisiblefromallaspectsofthesystemincludingtheCPUutilization.

Figure7.TheCPUutilizationofthesystemovertime,asmeasuredduringaflatrun

Notetheappearanceofwavesoveraperiodoftime.TheCPUutilizationisnotsmoothbutratherhasverysharppeaksthatresemblethethroughputgraph'swaves.

Additionally,theexecutequeueexperiencesthisunstableload,andthereforeyouseethequeuegrowingandshrinkingastheloadonthesystemincreasesanddecreasesovertime.

Figure8.Theexecutequeueofthesystemovertimeasmeasuredduringaflatrun

Notetheappearanceofwavesovertime.TheexecutequeueexactlymimicstheCPUutilizationgraphabove.

Finally,theresponsetimeofthetransactionsonthesystemwillalsoresemblethiswavepattern.

Figure9.Theresponsetimeofatransactiononthesystemovertimeasmeasuredduringaflatrun

Notetheappearanceofwavesovertime.Thetransactionresponsetimelinesupwiththeabovegraphs,buttheeffectisdiminishedovertime.

Thisoccurswhenalltheusersaredoingapproximatelythesamethingatthesametimeduringthetest.Thiswillproduceveryunreliableandinaccurateresults,sosomethingmustbedonetocounteractthis.Therearetwowaystogainaccuratemeasurementsfromthesetypesofresults.Ifthetestisallowedtorunforaverylongduration(sometimesseveralhours,dependingonhowlongoneuseriterationtakes)eventuallyanaturalsortofrandomnesswillsetinandthethroughputoftheserverwill"flattenout."Alternatively,measurementscanbetakenonlybetweentwoofthebreaksinthewaves.Th

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 动物植物

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1