




已閱讀5頁,還剩6頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
PerformancecomparisonofdynamicwebplatformsVarshaAptea,1,TonyHansenb,*,PaulReeserbaDepartmentofComputerScienceandEngineering,IndianInstituteofTechnology-Bombay,Mumbai400076,IndiabAT&TLabs,200LaurelAve,Middletown,NJ07748,USAReceived7August2002;accepted7August2002AbstractOverthelastfewyears,theWorldWideWebhastransformeditselffromastaticcontent-distributionmediumtoaninteractive,dynamicmedium.TheWebisnowwidelyusedasthepresentationlayerforahostofon-lineservicessuchase-mailandaddressbooks,e-cards,e-calendar,shopping,banking,andstocktrading.Asaconsequence(HyperTextMarkupLanguage)HTMLfilesarenowtypicallygenerateddynamicallyaftertheserverreceivestherequest.FromtheWeb-siteproviderspointofview,dynamicgenerationofHTMLpagesimpliesalesserunderstandingoftherealcapacityandperformanceoftheirWebservers.FromtheWebdeveloperspointofview,dynamiccontentimpliesanadditionaltechnologydecision:theWebprogrammingtechnologytobeemployedincreatingaWeb-basedservice.SincetheWebisinherentlyinteractive,performanceisakeyrequirement,andoftendemandscarefulanalysisofthesystems.Inthispaper,wecomparefourdynamicWebprogrammingtechnologiesfromthepointofviewofperformance.Thecomparisonisbasedontestingandmeasurementoftwocases:oneisacasestudyofarealapplicationthatwasdeployedinanactualWeb-basedservice;theotherisatrivialapplication.Thetwocasesprovideuswithanopportunitytocomparetheperformanceofthesetechnologiesattwoendsofthespectrumintermsofcomplexity.Ourfocusinthispaperisonhowcomplexvs.simpleapplicationsperformwhenimplementedusingdifferentWebprogrammingtechnologies.Thepaperdrawscomparisonsandinsightsbasedonthisdevelopmentandperformancemeasurementeffort.q2002PublishedbyElsevierScienceB.V.Keywords:Dynamic;Web;CommonGatewayInterface;FastCGI;C;Java;Servlets;JavaServerPages;Performance;Comparison1.IntroductionTheWorldWideWeb(WWW)firstemergedadecadeagoasamediumtorenderhypertextdocumentsthatwerestoredontheInternet,onauserscomputer,usingspecialsoftware(thebrowser)andanewprotocol(HTTP:HyperTextTransferProtocol).Forthefirstfewyears,theWWWgrewprimarilyasanewmediuminwhichstaticcontentcouldbepublished,andinformationshared.ThecontentwaspublishedintheformofHTML(HyperTextMarkupLanguage)files,whichwereservedbyWebservers,onrequestsfrombrowsers.However,overthelastfewyearstheWWWhastransformeditselffromastaticcontent-distributionmediumtoaninteractive,dynamicmedium.ContentontheWebisnowoftenpersonalized,andthereforedynamicallygenerated.TheWebisnowwidelyusedasthepresentationlayerforahostofon-lineservicessuchase-mail,e-cards,e-calendar,andaddressbooks,shopping,banking,andstocktrading.Asaconsequence,theHTMLfilesthatarerenderedbytheclientsbrowserarenowtypicallygenerateddynamicallyaftertheWebserverhasprocessedtheusersrequest.ThisdynamicgenerationofHTMLfileshasnothappenedwithoutanassociatedperformancecost.JustwhenInternetusersweregettingaccustomedtoclick-and-waitondial-uplinesduetographics-richWebsites,dynamicallygeneratedcontentstartedproliferatingontheWeb.Nowusersmustwaitnotonlyforthenetworkdelaybutalsofortheserver-sideprocessingdelayassociatedwithservingarequestdynamically.Inmanycases,thisisturningouttobethelargestcomponentofthedelay.FromtheWeb-siteproviderspointofview,dynamicgenerationofHTMLpagesimpliesalesserunderstandingoftherealcapacityoftheirWebservers.Thevendor-providedhits-per-secondcapacityoftheWebserverisnolongerenough,asthisonlypertainstostaticHTMLfiles.ComputerCommunications26(2003)888898/locate/comcom0140-3664/03/$-seefrontmatterq2002PublishedbyElsevierScienceB.V.PII:S0140-3664(02)00221-91ThisworkwasdonewhilethisauthorwaswiththeNetworkDesignandPerformanceAnalysisDepartment,AT&TLabs,Middletown,NJ07748,USA.ThisauthorhaspreviouslypublishedunderhermaidennameofVarshaMainkar.*Correspondingauthor.E-mailaddress:(T.Hansen).FromtheWebdeveloperspointofview,dynamicWebcontentimpliesanadditionaltechnologydecision:theWebprogrammingtechnologytobeemployedincreatingaWeb-basedserviceorproduct.Thisdecisionisbasedonseveralfactors.Amongthefactorsconsideredareeaseofprogramming,richnessoffeatures,maintain-ability,reliability,andperformance.SincetheWebisinherentlyinteractive,performanceisakeyrequirement,andoftendemandscarefulanalysisofthesystems.Inthispaper,wecomparetheperformanceoffourWebprogrammingtechnologies,namelyJavaServlets,JavaServerPages,CGI/CandFastCGI/C(asmallerversionofthisstudywaspresentedinRef.1).ThestudywasmotivatedbyarealneedtomakeatechnologychoicefordevelopingsoftwarethatwouldsupportaWeb-basedservice.Astudyofexistingliteratureshowedvaryingconclusionsabouttheperformancesuperiorityofonetechnologyovertheother.ProponentsoftheJavaplatformconsistentlyclaimsuperiorperformanceofservlettechnologymainlyduetotheeliminationoftheoverheadofprocesscreation2,3.Ontheotherhand,astudydoneinRef.4thatcomparesCGI,FastCGIandservletsshowedservletstobetheslowestofthethree.AsimilarcomparativestudyhasbeendoneinRef.5,focusingonWeb-to-databaseapplications,whichshowedJavaservletstobebetterthanCGIprograms.Further-more,although4brieflyprovidessomeexplanationabouttheresults,anin-depthanalysisandinsightabouttheresultswasnotavailableintheliteraturethatwesurveyed.Oneconclusionfromthevariabilityoftheresultswasalsothattheperformanceofthetechnologydependsontheapplication.Inthispaper,thecomparisonisbasedontwocases:oneisacasestudyofacomplexapplicationthatwasdeployedinanactualWeb-basedservice;theotherisatrivialapplication.Themethodologyofperformanceanalysiswasstresstestingandmeasurement.Performancemeasure-ment(ratherthanmodeling)mademostsenseinthiseffort,sinceaquickturnaroundofresultswasnecessaryandtheaccuracyofresultswasrequiredtobehigh.Thetwocases(i.e.thecomplexandthetrivial)provideduswithanopportunitytocompareperformanceofthesetechnologiesattwoendsofthespectrumofapplications,intermsofcomplexity.Theperformanceorderofdifferenttechnologiesisseldomabsoluteitdependsgreatlyonthenatureoftheapplication.Ourfocusinthispaperisonhowcomplexvs.simpleapplicationsperformwhenimplementedusingdifferentWebprogrammingtechnologies.Amongthepaperssurveyed,webelievethisistheonlypaperpresentingasystematicbottleneckanalysisofeachofthetechnol-ogies,andtheonlyonethatdemonstratesthattheperformancerankingcouldbereversed,basedontheapplication,whileprovidinginsightonwhythishappens.Themainobservationsfromthisworkwereasfollows:Ingeneral,FastCGIoutperformedCGI,whileJSPoutperformedJavaservlets.Inthecaseofacomplexapplication,theCGI-basedtechnologiesoutperformedtheJava-basedtechnologiesbyafactorof34,withJavaperformancelimitedbysoftwarebottlenecksintheJVM.Inthecaseofatrivialapplication,therelativeperformancewasreversed,asJavaoutperformedCGIbyafactorof23.Therestofthepaperisorganizedasfollows:inSection2weprovidethemotivationforconductingsuchacomparativestudy,andinSection3wedescribebrieflythetechnologiesthatwecompared.Section4describestheperformancemeasurementandanalysismethodology,Section5describesthecase-studytestingresultsindetail,andSection6describestheresultsoftestingatrivialapplication.Finally,Section7summarizesourresults,andSection8providessomeconcludingremarks.2.MotivationTheapplicationcontextforthiscasestudywasanewWeb-basedmessagingservice.Suchaservicewouldinvolveaback-endthatwouldincludethecoremessa-ging-relatedservers(IMAP,POP,LDAP,SMTP),andafront-end,orapresentationlayerthatwouldserveasmiddlewarebetweentheWebbrowserandthemessagingserver.Thecoreserverswerechosentobeestablishedmessagingproducts.ThepresentationlayerwouldconsistofaWebserver(off-the-shelf)andanewdynamicpagegenerationenginetobedeveloped,whichwouldReaddatasentbytheuser,throughtheHTTPprotocolDothenecessaryprotocolconversions(toIMAP,LDAP,)CarryouttheactionencodedintheHTTPrequest,usingtheappropriateprotocolwiththeback-endserversFormattheresultasaWeb-page,andReturntheresulttotheusersWebbrowserthroughtheWeb-serverOnewaytowritesuchaprogramthatgeneratesWebpagesdynamicallyistocodethelogic,andthenembedprintstatementsintheprogramthatwriteoutstaticHTMLcode,alongwithprintingotherstringvariablesthathavebeenpopulateddynamically.Abetterandmorepopularwayisusingtemplates.Themiddlewarewestudiedusedatemplate-baseddesignforproducingdynamicWebpages.ThismethodinvolveswritingWebpagetemplateswhichhavestaticHTMLcodethatspecifythedesignoftheWebpage,interspersedwithscriptingtagsthatareinterpretedbyatemplateserverprogram.Thesetagsinstructthetemplateserverprogramontheactionthatistobetaken(e.g.populatingafieldwiththesubjectlineofamessage)onreadingthetag.Thetemplateserverprogram,therefore,V.Apteetal./ComputerCommunications26(2003)888898889ParsesthespecifictemplateaccessedbyauserrequestInterpretsthetagsandcommunicateswiththeback-endserversPopulatesthefieldsthataretobydynamicallypopulatedTheresultisadynamicallygeneratedWebpage.ThearchitectureofsuchasystemisshowninFig.1.Giventheacceleratedtime-to-marketgoalsandlimiteddevelopmenttime,thenaturalchoiceoftechnologyforthetemplateserverwastheoneperceivedtobepowerful,feature-richandyeteasytouseanddeploynamely,Javaservlets.Aninitialeffortwasdonetoquantifytheperformanceofthispagegenerationengine,toseewhetheritcouldmeettheexpectedperformancerequirements.Weconductedaseriesofstresstestsusingacommercialloaddrivertogeneraterepeatedrequeststotheservletengineatvariouslevelsofconcurrency(simulatedusers).ThetestconfigurationconsistedofaWindowsNTserverrunningtheloadgenerationscripts(driver),aSolarisserverrunningthefront-endsoftware,andaSolarisserverrunningtheback-endapplication(forthistest,aPOP3/IMAP4mailserverandanLDAPdirectoryserver).Hardware(CPU,memory,disk,I/O)andsoftwareresourceconsumptionsweremeasuredonallmachines.Inaddition,end-to-enduser-perceivedresponsetimesweremeasured.Thedriverscriptsemulatedaprescribednumberofconcurrentusersrepeatedlygeneratingthesamerequest(e.g.readmessage,sendmessage,etc.).Thenumberofconcurrentsimulateduserswasvariedfrom1to20.Thenumberofrepeatedrequestsperuserateachconcurrencylevel(typically2000)wassufficienttoachievestatisticalstability.Thetestswereruninstressmode;thatis,assoonasauserreceivesaresponse,itimmediatelysubmitsthenextrequest(i.e.withnegligibleclientdelay).EachoftheNsimulatedusersdoessoindependentlyandinparallel.Asaresult,thecon-currencylevel(i.e.thenumberofrequestsinthesystem)equalsNatalltimes.Theresultsofthestresstestsforaparticularrequesttype(reada20KBmessage)areshowninFigs.2and3.Inparticular,Fig.2plotstheend-to-endresponsetime(normalized)ontheleft-handaxis,andthefront-endCPUutilizationontheright-handaxis,asafunctionoftheconcurrencylevel.Ascanbeseen,theresponsetimecurvebeginstoridealongalinearasymptote(shownbythedottedline)afteronlysevenconcurrentusers.Thatis,responseFig.1.Templateserverarchitecture.Fig.2.Resultsofinitialstresstestsoftemplateserver,plottedvs.concurrentusers.V.Apteetal./ComputerCommunications26(2003)888898890timeincreasesproportionallywiththenumberofusers,indicatingsaturationinaclosedsystem6.Additionally,CPUutilizationlevelsoffafter11usersat6570%(indicatinganon-CPUsystembottleneck).Equivalently,Fig.3plotsend-to-endresponsetimeasafunctionofthroughput(requests/s).Ascanbeseen,themaximumsystemthroughputpeaksatabout2requests/sec,andthendegradesunderoverloadtoabout11/2requests/s.Inotherwords,therewasactuallyadropincapacityof25%(aconcurrencypenalty),likelyduetocontextswitching,object/threadmanagement,garbagecollection,etc.Asizinganalysisbasedontheexpectedcustomergrowthandusagebehavior,togetherwiththeseinitialcapacityresults,suggestedthattheresultinghardwarecostswouldbeprohibitivelylarge.Itwasalsoclearthatthescalabilityofthisapplicationwaspoor.Theresourceconsumptionresultsdemonstratedthattheapplicationcouldnotmakefu
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年鐵路運輸安全管理師資格考試試卷及答案
- 2025年影視剪輯與后期制作實踐考試卷及答案
- 2025年網(wǎng)頁設(shè)計與制作考試試題及答案
- 2025年廣告設(shè)計與創(chuàng)意基礎(chǔ)考試試卷及答案
- 2025年文化產(chǎn)業(yè)管理專業(yè)入學(xué)考試試題及答案
- 新能源汽車高性能電機控制器研發(fā)與生產(chǎn)合作協(xié)議
- 高層建筑工程測量與抗震評估協(xié)議
- 直播平臺主播IP授權(quán)合作協(xié)議
- 氫能源技術(shù)員項目績效評估合同
- 多語種同傳翻譯術(shù)語庫與技術(shù)解決方案租賃合同
- 光影中國學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 工科中的設(shè)計思維學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 2020年全國II卷英語高考真題試題(答案+解析)
- 腦洞大開背后的創(chuàng)新思維學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 科傻平差軟件說明指導(dǎo)書
- ipo上市商業(yè)計劃書
- 山東省青島市市北區(qū)2023-2024學(xué)年七年級下學(xué)期英語期末考試試題
- 《養(yǎng)老護(hù)理員》-課件:老年人安全防范及相關(guān)知識
- 小兒肺炎診治考核試題及答案
- 五年級信息技術(shù)第13課畫城堡課件
- 林場儲備林建設(shè)項目施工布署及平面布置
評論
0/150
提交評論