




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
OS-causedLongJVMPauses-DeepDiveandSolutionsZhenyunZhuang/in/zhenyunLinkedInCorp/in/zhenyunZhenyun@2016-4-212016-4-213Lessonslearned4§Javaispopularinproductiondeployments§LinuxfeaturesinteractwithJVMoperations§Uniquechallengescausedbyconcurrentapplications口LongJVMpausescausedbyLinuxOS§Productionissues,inthreescenarios§Rootcauses§Solutions§EnsuringHigh-performanceofMission-criticalJavaApplicationsinMulti-tenantCloudPlatforms,IEEECloud2014§EliminatingLargeJVMGCPausesCausedbyBackgroundIOTrafic,LinkedInEngineeringBlog,2016(Toomanytweetsbringingdownatwitterserver!:)5 §OracleHotSpotJVM§Generations§Garbagecollectors§Paging(Regularpage,Hugepage)§Swapping(Anonymousmemory)§Pagecachewriteback(Batched,Periodic)6Scenarios§Startupstate§Steadystatewithmemorypressure§SteadystatewithheavyIO§Javaapplicationkeepsallocating/de-allocatingobjects§BackgroundapplicationstakingmemoriesorissuingdiskIO§Applicationthroughput(Kallocations/sec)§JavaGCpauses7Cpausesspikeduringthesameperiod8JavaheapisgraduallyallocatedWithoutenoughmemory,JavaheapisgraduallyallocatedWithoutenoughmemory,directpagescanningcanhappenHeapisswappedoutandinItcauseslargeGC9SolutionsJVM“-XX:AlwaysPreTouch”apspacesfrombeingswappedout?=0forkernelversionbefore2.6.32-303?=1forkernelversionfrom2.6.32-303tionsPreallocatingHeapingHeapmreal=54.83secs]口However,swappingisnotenough[real=54.83secs]口However,swappingisnotenough[Times:user=0.12sys=54.67,口DuringGCpauses,swappingactivitiespersist口SwappinginJVMpagescausesGCpauses§ExcessiveGCpauses(i.e.,55seconds)§Highsys-cpuusage(swappingisnotsys-cpuintensive)4KB4KB4KB4KB4KB4KB4KB4KB4KB4KB4KB4KBPages(THP)22MB§ImprovedTLBcache-hitss§THPsareallocatedfirst,butsplitduringmemorypressure§RegularpagesarecollapsedtomakeTHPs§CPUheavy,andthrashing!SolutionsrsationsDynamicTHP§DynamicTHPdeliverssimilarperformanceasTHPisonMechanismTHPOffTHPOnDynamicTHPThroughput(Kallocations/sec)§DynamicTHPhassomeperformanceoverhead§PerformanceislessthanTHP-off§ButbetterthanTHP-onMechanismTHPOffTHPOnDynamicTHPThroughput(Kallocations/sec)口Productionissue§Onlineproducts§Applicationshavelightworkload§BothCMSandG1garbagecollectors口Preliminaryinvestigations§Examinedmanylayers/metrics§Theonlysuspect:diskIOoccasionallyisheavy§ButallapplicationIOareasynchronouslem口WorkloaddNosinglelonger-than-200mspauseCaseII:WithbackgroundIO TimelinesAttime35.04(line2),ayoungGCstartsandtakes0.12secondstocomplete.tics5)tTheyoungGCfinishesattime35.16andJVMtriestooutputtheyoungGCstatiogclogfilebyissuingawrite()systemcalltics5)tThewrite()callfinishesattime36.64afterbeingblockedfor1.47seconds(lineWhenwrite()callreturnstoJVM,JVMrecordsattime36.64thisSTWpauseofseconds(i.e.,0.12+1.47)(line3).InteractionbetweenJVMandOSNon-blockingIOcanbeblocked§Forfile-backedwriting,OSwritestopagecachefirst§OShaswrite-backmechanismtopersistdirtypages§Ifapageisunderwrite-back,thepageislocked§Journalsaregeneratedforjournalingfilesystem§WhenappendingGClogfilesneedsnewblocks,journalsneedtobecommitted§CommitmentmightneedtowaitBackgroundIOactivities口OSactivitysuchasswapping§Datawritingtounderlyingdisks口Administrationandhousekeepingsoftware§System-levelsoftwaresuchasCFEnginealsoperformdiskIO口Otherco-locatedapplications§Co-locatedapplicationsthatsharethediskdrives,thenotherapplicationscontendonIO口IOofthesameJVMinstance§TheparticularJVMinstancemayusediskIOinwaysotherthanGCloggingSolutionsThegood,thebad,andtheugly口Thegood:lowrealtime§Lowusertimeandlowsystime§[user=0.18sys=0.01,real=0.04secs]口Thebad:non-low(butnothigh)realtime§Highusertimeandlowsystime§[user=8.00sys=0.02,real=0.50secs]口Theugly:highrealtime§Highsystime[u
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 甘肅小學(xué)課題申報(bào)書范例
- 中醫(yī)社科課題申報(bào)書范文
- 課題申報(bào)書研究設(shè)計(jì)方案
- 教材課題申報(bào)書
- 入職離職合同范本
- 教學(xué)模式科研課題申報(bào)書
- 賣沙子購銷合同范本
- 代銷售居間合同范本
- 司機(jī)出租合同范本
- 合同范本文字要求
- 水稻種子生產(chǎn)技術(shù)
- 第四章 學(xué)習(xí)心理導(dǎo)論
- 旅游政策與法規(guī)教案
- 征兵心理測(cè)試
- JJF 1914-2021金相顯微鏡校準(zhǔn)規(guī)范
- 2023年江蘇農(nóng)林職業(yè)技術(shù)學(xué)院高職單招(語文)試題庫含答案解析
- GB/T 15622-2005液壓缸試驗(yàn)方法
- 旋挖樁安全專項(xiàng)施工方案
- 基于STM32的多路模擬量數(shù)據(jù)采集設(shè)計(jì)
- 統(tǒng)編版高中語文選擇性必修下冊(cè)教學(xué)計(jì)劃
- 北師大版八年級(jí)下冊(cè)數(shù)學(xué)全冊(cè)教案完整版教學(xué)設(shè)計(jì)
評(píng)論
0/150
提交評(píng)論