Faster Serialization and Faster RMI for Java Michael
- Slides: 10
Faster Serialization and Faster RMI for Java Michael Philippsen and the Java. Party Team Universität Karlsruhe and FZI Forschungszentrum Informatik Germany Forschungszentrum Informatik, Karlsruhe
Motivation • Serialization and RMI are too slow for Grande Applications: • Improvements are needed in three areas: – Faster serialization for Java – Faster RMI for Java – Use of non-TCP/IP networks with RMI • Java. Party project works on all three areas Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 2
Faster Serialization: UKA-Serialization • Drop-in replacement (plus class file retrofitter) • Save 76%-96% of the time needed for serialization • Minor (? ) incompatibilities: – targeted towards fast communication, not made for persistent objects (store objects now and reload them in x years with some future release of Java) – not yet: remote loading of byte code • Some impact on Sun Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 3
UKA Serialization: 5 key ideas 1 Explicit marshalling is faster than automatic marshalling by means of reflection 2 Slim type encoding is faster (no reflection needed) – Sun will include hook-method for it with next JDK – It is unlikely that Sun's RMI will use this hook 3 Two types of reset (avoid repetition) – Sun will work on the efficiency of the internal impl. 4 Better buffering and better buffer accessibility – Sun will not do that because they feel that making the buffer array visible is not very object-oriented 5 float[] and double[] with one JNI entry – Hotspot guys promise to do it Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 4
UKA Serialization: benchmarks Steps of improvement: Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 5
Faster RMI: Ka. RMI • Drop-in replacement with almost the same API • Can exploit non-TCP/IP networks • Saves up to 96% of the time needed for a remote method invocation (including UKA serialization): 80 ms on Digital Alphas connected by Myrinet • Minor (? ) incompatibilities: – no sockets & ports at user-level – no support of undocumented RMI classes • Some impact on Sun Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 6
Ka. RMI: Grande problems of Sun's RMI • RMI's transport layer cannot be replaced • • although high speed networks are available RMI's layers are badly documented sockets and ports at user-level API prevent use of non-TCP/IP transport RMI's implementation not optimized for speed (many temporary objects, many JNI calls, many hash tables. . . ) RMI's distributed garbage collector cannot be replaced although there are more efficient collectors for clusters Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 7
Ka. RMI: design Clean Interfaces between Design Layers Technology objects hide hardware Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 8
Benchmark Results Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 9
Conclusion & Future • With UKA Serialization and Ka. RMI, high-performance networks can be used for Grande Applications • More information and download: http: //wwwipd. ira. uka. de/Java. Party/ • Jini uses RMI as ist basic mechanism. With the current Jini hype, the Java Grande Forum needs your support to make a stonger impact on Sun to work on performance aspects. Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI 10