外文资料--Performance comparison of dynamic web platforms.pdf_第1页
外文资料--Performance comparison of dynamic web platforms.pdf_第2页
外文资料--Performance comparison of dynamic web platforms.pdf_第3页
外文资料--Performance comparison of dynamic web platforms.pdf_第4页
外文资料--Performance comparison of dynamic web platforms.pdf_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论