Optimising Java RMI Programs by Communication Restructuring
We present an automated run-time optimisation framework that can improve the performance of distributed applications written using Java RMI whilst preserving its semantics. Java classes are modified at load-time in order to intercept RMI calls as they occur. RMI calls are not executed immediately, but are delayed for as long as possible. When a dependence forces execution of the delayed calls, the aggregated calls are sent over to the remote server to be executed in one step. This reduces network overhead and the quantity of data sent, since data can be shared between calls. The sequence of calls may be cached on the server side along with any known constants in order to speed up future calls. A remote server may also make RMI calls to another remote server on behalf of the client if necessary. Our results show that the techniques can speed up distributed programs signicantly, especially when operating across slower networks. We also discuss some of the challenges involved in maintaining program semantics, and show how the approach can be used for more ambitious optimisations in the future.
KeywordsRemote Server Ethernet Network Remote Object Remote Method Invocation Escape Analysis
- 1.Paulo Sérgio Almeida. Balloon types: Controlling sharing of state in data types. In Proceedings of ECOOP’ 97, volume 1241 of Lecture Notes in Computer Science, pages 32–59. Springer, June 1997.Google Scholar
- 2.Phillip Bogle and Barbara Liskov. Reducing cross domain call overhead using batched futures. In Conference on Object-Oriented Programming Systems, Languages, and Applications,pages 341–354, Portland OR (USA), 1994.Google Scholar
- 3.R. Christ, S. L. Halter, K. Lynne, S. Meizer, S. J. Munroe, and M. Pasch. San Francisco performance: A case study in performance of large-scale Java applications. IBM Systems Journal, 39(1), 2000.Google Scholar
- 4.Markus Dahm. Byte code engineering library manual. Available from http://jakarta.apache.org/bcel/manual.html.
- 6.David Flanagan. Java Examples in a Nutshell. O’Reilly UK, 2000.Google Scholar
- 7.Aniruddha Gokhale and Douglas C. Schmidt. Principles for optimizing CORBA internet inter-ORB protocol performance. In 31th Hawaii International Conference on System Sciences, January 1998.Google Scholar
- 8.J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification — Second Edition. Addison-Wesley, 2000.Google Scholar
- 9.Object Management Group. The Common Object Request Broker: Architecture and specification v2.4.2, February 2001.Google Scholar
- 10.Vijaykumar Krishnaswamy, Dan Walther, Sumeer Bhola, Ethendranath Bommaiah, George Riley, Brad Topol, and Mustaque Ahamad. Efficient implementations of Java remote method invocation (RMI). In Proc. of the 4th USENIX Conference on ObjectOriented Technologies and Systems (COOTS’98), 1998., pages 19–36, 1998.Google Scholar
- 11.Barbara Liskov and Liuba Shrira. Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In Proceedings of the SIGPLAN’88 conference on Programming Language Design and Implementation, pages 260–267, 1988.Google Scholar
- 12.Sun Microsystems. RMI specification, available at http://java.sun.com/products/jdk/rmi/.
- 13.Christian Nester, Michael Phillippsen, and Bernhard Haumacher. A more efficient RMI for Java. In ACM 1999 Java Grande Conference, pages 152–159, June 1999.Google Scholar
- 15.R. Raje, J. William, and M. Boyles. An Asynchronous Remote Method Invocation (ARMI) mechanism for Java. Concurrency: Practice and Experience, November 1997.Google Scholar
- 16.Raja Vallee-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. Soot-a Java bytecode optimization framework. In Proceedings of CASCON’ 99, pages 125–135, 1999.Google Scholar
- 17.John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, volume 34 of ACM SIGPLAN Notices, pages 187–206, November 1999.Google Scholar