High-Performance File IO in Java Existing Approach

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

High-PerformanceFileI/OinJava:ExistingApproachesandBulkI/OExtensionsDanBonacheaPhillipDickensyRajeevThakurzAbstractThereisagrowinginterestinusingJavaasthelanguagefordevelopinghigh-performancecomputingapplications.Tobesuccessfulinthehigh-performancecomputingdomain,however,Javamustnotonlybeabletoprovidehighcomputationalperformance,butalsohigh-performanceI/O.Inthispaper,werstexamineseveralapproachesthatattempttoprovidehigh-performanceI/OinJava|manyofwhicharenotobviousatrstglance|andevaluatetheirperformanceontwoparallelmachines,theIBMSPandtheSGIOrigin2000.WethenproposeextensionstotheJavaI/OlibrarythataddressthedecienciesintheJavaI/OAPIandimproveperformancedramatically.Theextensionsaddbulk(array)I/OoperationstoJava,therebyremovingmuchoftheoverheadcurrentlyassociatedwitharrayI/OinJava.Wehaveimplementedtheextensionsintwoways:inastandardJVMusingtheJavaNativeInterface(JNI)andinahigh-performanceparalleldialectofJavacalledTitanium.Wedescribethetwoimplementationsandpresentperformanceresultsthatdemonstratethebenetsoftheproposedextensions.1IntroductionThereisagrowinginterestinusingJavaforhigh-performancecomputingbecauseofthemanyadvantagesthatJavaoersasaprogramminglanguage.Tobeusefulasalanguageforhigh-performancecomputing,however,Javamustnotonlyhavegoodsupportforcomputationbutmustalsobeabletoprovidehigh-performanceleI/O,asmanyscienticapplicationshavesignicantI/Orequirements[6,22,34].Inthispaper,weinvestigatetheI/OcapabilitiesofJavaforhigh-performancecomputingandprovidesuggestionsforrelativelysimplechangestotheJavaI/Omodelthatcanimproveperformancesignicantly.Werstexamineseveralapproachesthatattempttoprovidehigh-performanceI/OinJava|manyofwhicharenotobviousatrstglance|andevaluatetheirperformance.Weperformexperimentsontwodierentparallelmachines,adistributed-memorysystem(IBMSP)andashared-memorysystem(SGIOrigin2000),bothofwhichemploymodernparallel/high-performancelesystems.WethenproposeextensionstotheJavaI/OlibrarythataddressthedecienciesintheJavaI/OAPIandimproveperformancedramatically.Theextensionsaddbulk(array)I/OoperationstoJava,therebyremovingmuchoftheoverheadcurrentlyassociatedwitharrayI/OinJava.Wehaveimplementedtheextensionsintwoways:inastandardJVMusingtheJavaNativeInterface(JNI)[24]andinahigh-performanceparalleldialectofJavadevelopedatU.C.BerkeleycalledTitanium[35,38].Wedescribethetwoimplementationsandpresentperformanceresultsthatdemonstratethebenetsoftheseextensions.EECSDepartment,UniversityofCaliforniaatBerkeley,Berkeley,CA94720.bonachea@cs.berkeley.eduyDept.ofComputerScience,IllinoisInstituteofTechnology,10West31stStreet,Chicago,IL60616.pmd@work.csam.iit.eduzMathematicsandComputerScienceDivision,ArgonneNationalLaboratory,Argonne,IL60439.thakur@mcs.anl.gov11.1I/OinHigh-PerformanceComputingManycomputationallyintensivescienticapplicationsalsoneedtoaccesslargeamountsofdata,andI/Oisoftenthebottleneckinsuchapplications[6,22,34].AcommonI/Orequirementisasfollows.Theapplicationhassomelargedatastructures,saymultidimensionalarrays,distributedamongprocessesinsomefashion.Thearraysmustbereadfromorwrittentoalecontainingtheglobalarray.Theprogrammaybeginbyreadinginaninputarrayandmaythenwritearraystolesseveraltimesduringthecourseofthecomputation.Thearraysintheseapplicationsarenotjustbytearrays,butratherconsistofintegers,oroating-pointnumbers,orsomeotherdatatype.Asweshallseeinthispaper,thefactthattheyarenotjustbytearraysisimportantinthecontextofusingJavaforI/Oinsuchapplications.Inaddition,thelesareusuallyrandom-accessles,andprocessesseektodierentlocationsinthelestoread/writedata.Inthispaper,wefocusontheproblemofconcurrentreadingorwritingofdatafrommultipleprocesses/threadstoacommonleinJava.Weassumethatalargeone-dimensionalarrayofintegersisblock-distributedamongprocessesandmustbereadfromorwrittentoacommonlecontainingtheglobalarray.Whilesimple,thisexampleissucienttodemonstratethestrengthsandweaknessesoftheJavaI/Omodelasapplicabletothebasicneedsofhigh-performancecomputingapplications.Ourexperimentsassume(andemploy)arandom-accesslethatisstripedacrossthedisksofaparallellesystem.MuchoftheresearchrelatedtoparallelI/OhasbeenperformedinthecontextofC,andCprovidesexcellentsupportforsuchoperations.Inparticular,Callowsthecastingofanarrayofanytypeintoanarrayofbytes,andmultidimensionalarrayscanbetreatedasone-dimensionalarraysofthesamesize.TheUnixI/Ofunctionssimplytakeapointertoaone-dimensionalarray,thenumberofbytestobereadorwritten,andtheosetintothele,andtheycarryouttherequestasasingleI/Ooperation.ItisalsoquitesimpletoperformparallelreadsandwritesinCwithouttheneedforsynchronization(onlesystemsthatsupportsuchaccess).Inparticular,eachprocesscanseektoanindependent(non-overlapping)regionofasharedrandom-accessleandthenperformitsreadsorwritestodisjointregionsoftheleinparallel.ThereareotheradvantagesofC/UnixbasedI/Oaswell.Oneadvantageisthatlocal(nonportable)hookstoaparallellesystemcanprovideexcellentperformanceenhancementsonsomemachines.Forexample,theODIRECToptionavailableontheXFSlesystemontheSGIOrigin2000allowstheapplica

1 / 23
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功