Abstract
Modern JVM implementations interleave execution with compilation of “hot” methods to achieve reasonable performance. Since compilation overhead impacts the execution time of the application and induces run-time pauses, we explore offloading compilation onto a compilation server. In this article, we present the design, implementation, and evaluation of a compilation server that compiles and optimizes Java bytecodes on behalf of its clients.
We show that the compilation server provides the following benefits for our benchmark programs: (i) lower execution time by reducing the compilation overhead and by enabling more aggressive optimizations; (ii) lower memory allocation by eliminating allocations due to optimizing compilation and the footprint of the optimizing compiler; (iii) lower execution time of the application due to sharing of profile information across different runs of the same application and runs of different applications.
We implemented the compilation server in Jikes RVM, and our results indicate that it can reduce running time by an average of 20.5%, interruptions due to compilation by an average of 81.0%, and dynamic memory allocation by 8.6% for our benchmark programs. Simulation results indicate that our current implementation of the compilation server can handle more than 50 concurrent clients while still allowing them to outperform the best performing adaptive configuration.
- Arnold, M., Fink, S., Grove, D., Hind, M., and Sweeney, P. 2000. Adaptive optimization in the Jalapeño JVM. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, Minneapolis, MN, 47--65. Google Scholar
- Arnold, M., Hind, M., and Ryder, B. G. 2002. Online feedback-directed optimization of Java. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, Seattle, WA, 111--129. Google Scholar
- Arnold, M. and Ryder, B. G. 2001. A framework for reducing the cost of instrumented code. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation. ACM Press, Snowbird, UT, 168--179. Google Scholar
- Auslander, J., Philipose, M., Chambers, C., Eggers, S. J., and Bershad, B. N. 1996. Fast, effective dynamic compilation. In Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation. ACM Press, Philadelphia, PA, 149--159. Google Scholar
- Burke, M., Choi, J.-D., Fink, S., Grove, D., Hind, M., Sarkar, V., Serrano, M., Sreedhar, V. C., and Srinivasan, H. 1999. The Jalapeño dynamic optimizing compiler for Java. In ACM Java Grande Conference. ACM Press, San Francisco, CA, 129--141. Google Scholar
- Chambers, C. and Ungar, D. 1991. Making pure object-oriented languages practical. In Proceedings of the 1991 Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, Phoenix, AZ, 1--15. Google Scholar
- Cheng, P. and Blelloch, G. E. 2001. A parallel, real-time garbage collector. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation. ACM Press, Snowbird, UT, 125--136. Google Scholar
- Cierniak, M., Lueh, G.-Y., and Stichnoth, J. M. 2000. Practicing JUDO: Java under dynamic optimizations. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation. ACM Press, Vancouver, BC, 13--26. Google Scholar
- Cytron, R., Ferrante, J., Rosen, B. K., Wegman, M. N., and Zadeck, F. K. 1991. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst. (TOPLAS) 13, 4, 451--490. Google Scholar
- Delsart, B., Joloboff, V., and Paire, E. 2002. JCOD: A lightweight modular compilation technology for embedded Java. In Proceedings of the Second International Conference on Embedded Software. Springer-Verlag, Grenoble, France, 197--212. Google Scholar
- Detlefs, D. and Agesen, O. 1999. Inlining of virtual methods. In Proceedings of the 13th European Conference on Object-Oriented Programming. Springer-Verlag, Lisbon, Portugal, 258--278. Google Scholar
- Ellis, S. 2003. The ‘nc’ network compilation tool. Available at http://www.brouhaha.com/ellis/software/index.html.Google Scholar
- Fink, S. J. and Qian, F. 2003. Design, implementation, and evaluation of adaptive recompilation with on-stack replacement. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, San Francisco, California, 241--252. Google Scholar
- Flinn, J., Narayanan, D., and Satyanarayanan, M. 2001. Self-tuned remote execution for pervasive computing. In 8th Workshop on Hot Topics in Operating Systems (HotOS-VIII). IEEE Computer Society Press, Schloss Elmau, Oberbayern, Germany. Google Scholar
- Gosling, J., Joy, B., Steele, G., and Bracha, G. 2000. Java Language Specification, Second Ed.: The Java Series. Addison-Wesley Longman Publishing Co., Inc., Boston, MA. Google Scholar
- Hauswirth, M., Sweeney, P. F., Diwan, A., and Hind, M. 2004. Vertical profiling: understanding the behavior of object-priented applications. In OOPSLA 2004: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, New York, NY, USA, 251--269. Google Scholar
- Hölzle, U. and Ungar, D. 1994. A third-generation self implementation: reconciling responsiveness with performance. In Proceedings of the Ninth Annual Conference on Object-oriented Programming Systems, Language, and Applications. ACM Press, Portland, OR, 229--243. Google Scholar
- Hölzle, U. and Ungar, D. 1996. Reconciling responsiveness with performance in pure object-oriented languages. ACM Trans. Program. Lang. Syst. 18, 4, 355--400. Google Scholar
- Kistler, T. and Franz, M. 1998. Computing the similarity of profiling data: Heuristics for guiding adaptive compilation. In Workshop on Profile and Feedback-Directed Compilation. Springer Verlag, Paris, France.Google Scholar
- Kremer, U., Hicks, J., and Rehg, J. M. 2000. Compiler-directed remote task execution for power management. In Workshop on Compilers and Operating Systems for Low Power (COLP 2000). Philadelphia, PA.Google Scholar
- Kremer, U., Hicks, J., and Rehg, J. M. 2001. A compilation framework for power and energy management on mobile computers. Tech. Rep. DCS-TR-446, Rutgers University.Google Scholar
- Krintz, C. 2003. Coupling on-line and off-line profile information to improve program performance. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, San Francisco, CA, 69--78. Google Scholar
- Kuznetsov, A. 1998. IPROUTE2 utility suite howto. Available at http://www.linuxgrill.com/iproute2-toc.html.Google Scholar
- Lee, H. B., von Dincklage, D., Diwan, A., and Moss, J. E. B. 2006. Understanding the behavior of compiler optimizations. Software: Practice and Experience 36, 8 (July), 835--844. Google Scholar
- Lindholm, T. and Yellin, F. 1996. The Java Virtual Machine Specification. Addison-Wesley, Boston, MA. Google Scholar
- Newsome, M. and Watson, D. 2002. Proxy compilation of dynamically loaded Java classes with MoJo. In Proceedings of the Joint Conference on Languages, Compilers and Tools for Embedded Systems. ACM Press, Berlin, Germany, 204--212. Google Scholar
- Paleczny, M., Vick, C., and Click, C. 2001. The Java HotSpot(TM) server compiler. In Java Virtual Machine Research and Technology Symposium. The Usenix Association, Monterey, CA. Google Scholar
- Palm, J., Lee, H., Diwan, A., and Moss, J. E. B. 2002. When to use a compilation service? In Proceedings of the Joint Conference on Languages, Compilers and Tools for Embedded Systems. ACM Press, Berlin, Germany, 194--203. Google Scholar
- Plezbert, M. P. and Cytron, R. K. 1997. Does “just in time” = “better late than never”? In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, Paris, France, 120--131. Google Scholar
- Pool, M. 2003. distcc, a fast free distributed compiler. Available at http://distcc.samba.org/doc/lca2004/distcc-lca-2004.html. White Paper.Google Scholar
- Radhakrishnan, R., Vijaykrishnan, N., John, L. K., and Sivasubramaniam, A. 2000. Architectural issues in Java runtime systems. In Proceedings of the 6th International Symposium on High Performance Computer Architecture (HPCA-6). IEEE, Toulouse, France, 387--398.Google Scholar
- Savari, S. and Young, C. 2000. Comparing and combining profiles. Journal of Instruction-Level Parallelism 2.Google Scholar
- Sirer, E. G., Grimm, R., Gregory, A. J., and Bershad, B. N. 1999. Design and implementation of a distributed virtual machine for networked computers. In 17th ACM Symposium on Operating System Principles (SOSP 1999). ACM Press, Kiawah Island, SC, 202--216. Google Scholar
- Standard Performance Evaluation Corporation (SPEC). 1998. SPECjvm98 benchmarks. http://www.specbench.org/osg/jvm98.Google Scholar
- Standard Performance Evaluation Corporation (SPEC). 2000. SPECjbb2000 benchmark. http://www.specbench.org/jbb2000/.Google Scholar
- Suganuma, T., Yasue, T., Kawahito, M., Komatsu, H., and Nakatani, T. 2001. A dynamic optimization framework for a Java just-in-time compiler. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, Tampa Bay, FL, USA, 180--195. Google Scholar
- Teodorescu, R. and Pandey, R. 2001. Using JIT compilation and configurable runtime systems for efficient deployment of Java programs on ubiquitous devices. In Ubiquitous Computing 2001, LNCS 2201. Springer Verlag, Atlanta, GA, 76--95. Google Scholar
- Voss, M. J. and Eigemann, R. 2001. High-level adaptive program optimization with ADAPT. In Proceedings of the Eighth ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming. ACM Press, Snowbird, UT, 93--102. Google Scholar
Index Terms
Design, implementation, and evaluation of a compilation server
Recommendations
Method based technique of compilation with compilation server
A2CWiC '10: Proceedings of the 1st Amrita ACM-W Celebration on Women in Computing in IndiaCompiler optimizations are difficult to implement and add complexity to a compiler. For this reason, compiler writers are selective about implementing them: they implement only the ones that they believe will be beneficial. Compilation Server (CS) is a ...
Efficient Java exception handling in just-in-time compilation
Research ArticlesJava uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just-in-time (JIT) compiler, while exceptions are rarely used in most programs. This ...
Exceptionization: A Java VM Optimization for Non-Java Languages
Java virtual machine (JVM) has recently evolved into a general-purpose language runtime environment to execute popular programming languages such as JavaScript, Ruby, Python, and Scala. These languages have complex non-Java features, including dynamic ...






Comments