Font Size: a A A

Analysis And Optimization Of The Garbage Collection Algorithm In The ART Virtual Machine

Posted on:2018-05-27Degree:MasterType:Thesis
Country:ChinaCandidate:J S ZhangFull Text:PDF
GTID:2428330545961219Subject:Integrated circuit engineering
Abstract/Summary:PDF Full Text Request
As a new Android virtual machine,ART enhances system performance through pre-compilation technology(Ahead-Of-Time compile)and more efficient,fine-grained garbage collection mechanism(GC).However,due to Android's own architecture design and third-party software and other reasons,response delay and system suspension still exist,degrading user experience.On the other hand,the unreasonable scheduling of GC threads leads to waste of CPU resources,power consumption,user thread response delay and other issues.This thesis puts forward the optimization strategy through deeply studing the ART garbage collection algorithm and its implementation.First,the gradual GC strategy is significant for reducing the majority of GC pause,but in high nemory usage scenaros,the GC execution efficiency is reduced.But the naive algorthm does not adjust the GC execution strategy for the scenario.In order to solve this problem,this thesis designs a GC type selector based on dynamic throughput assessment,and adjusts the next GC execution strategy by judging the current application execution scenario.Second,most of the UI rendering operations end without 16.6ms(VSYNC signal period),and if the UI thread "idle time" is used to take part of the GC work,the task load of GC thread will be reduced.So this thesis designs a GC scheduling strategy,scheduling the appropriate implementation of the GC according to the "idle time" size,to reduce the GC negative impact on the UI thread and other user threads.Based on Nexus4 mobile hardware platform and Android5.1.1_r1 system software platform,ten common Android applications and three benchmark are tested in the Nexus4 mobile phone,the results show that:First,in high memory occupancy seenarios,the average increase inGC throughput is 15.72%,and the average memory footprint and the average GC pause and other overhead is within 5%.Second,through the random statistics of 128 frame rendering process,the onDraw()function time-consuming and FPS frame rate are tested to characterize UI response UI response,the IdelTime GC strategy reduces the onDraw()function time-consuming by 8.34%,while the average FPS Frame rate increases by 9.11%.Oxbenchmark performance text shows that the optimization work reduces the average execution time of the GC by 9.55%and the average number of GCs by 11.01%.
Keywords/Search Tags:Android, ART, Garbage Collection, Throughput, GC scheduling strategy
PDF Full Text Request
Related items