{"title":"Heuristic optimisation algorithm for Java dynamic compilation","authors":"Yijun Liu, A. Fong","doi":"10.1049/iet-sen.2011.0144","DOIUrl":null,"url":null,"abstract":"Dynamic compilation increases Java virtual machine (JVM) performance because running compiled codes is faster than interpreting Java bytecodes. However, inappropriate decision on dynamic compilation may degrade performance owing to compilation overhead. A good heuristic algorithm for dynamic compilation should achieve an appropriate balance between compilation overhead and performance gain in each method invocation sequence. A method-size and execution-time heuristic algorithm is proposed in the study. The key principle of the algorithm is that different method-sizes necessitate different compile thresholds for optimal performance. A parameter search mechanism using a genetic algorithm for dynamic compilation is proposed to find optimised multi-thresholds in the algorithm. This heuristic algorithm is evaluated in an openJDK Java Server JVM using SPEC JVM98 benchmark suite. The algorithm shows an overall advantage in performance speedup when testing benchmarks and gain speedup by 19.1% on average. The algorithm also increases the performance of original openJDK by 10.2% when extended to the whole benchmark suite.","PeriodicalId":13395,"journal":{"name":"IET Softw.","volume":"67 1","pages":"307-312"},"PeriodicalIF":0.0000,"publicationDate":"2012-10-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IET Softw.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1049/iet-sen.2011.0144","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
Dynamic compilation increases Java virtual machine (JVM) performance because running compiled codes is faster than interpreting Java bytecodes. However, inappropriate decision on dynamic compilation may degrade performance owing to compilation overhead. A good heuristic algorithm for dynamic compilation should achieve an appropriate balance between compilation overhead and performance gain in each method invocation sequence. A method-size and execution-time heuristic algorithm is proposed in the study. The key principle of the algorithm is that different method-sizes necessitate different compile thresholds for optimal performance. A parameter search mechanism using a genetic algorithm for dynamic compilation is proposed to find optimised multi-thresholds in the algorithm. This heuristic algorithm is evaluated in an openJDK Java Server JVM using SPEC JVM98 benchmark suite. The algorithm shows an overall advantage in performance speedup when testing benchmarks and gain speedup by 19.1% on average. The algorithm also increases the performance of original openJDK by 10.2% when extended to the whole benchmark suite.
动态编译提高了Java虚拟机(JVM)的性能,因为运行编译后的代码比解释Java字节码要快。但是,不适当的动态编译决策可能会由于编译开销而降低性能。一个好的动态编译启发式算法应该在每个方法调用序列中的编译开销和性能增益之间实现适当的平衡。提出了一种方法大小和执行时间的启发式算法。该算法的关键原理是不同的方法大小需要不同的编译阈值以获得最佳性能。提出了一种采用遗传算法动态编译的参数搜索机制,在算法中寻找最优的多阈值。该启发式算法在openJDK Java Server JVM中使用SPEC JVM98基准测试套件进行评估。在基准测试中,该算法在性能加速方面具有总体优势,平均加速提升19.1%。当扩展到整个基准测试套件时,该算法也使原始openJDK的性能提高了10.2%。