Allgemeiner Foliensatz fŸr FZI-PrŠsentationen

Download Report

Transcript Allgemeiner Foliensatz fŸr FZI-PrŠsentationen

Faster Serialization and
Faster RMI for Java
Michael Philippsen
and the JavaParty 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
• JavaParty project works on all three areas
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
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
4
UKA Serialization: benchmarks
Steps of improvement:
5
Faster RMI: KaRMI
• 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):
80ms on Digital Alphas connected by Myrinet
• Minor (?) incompatibilities:
– no sockets & ports at user-level
– no support of undocumented RMI classes
• Some impact on Sun
6
KaRMI: 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
7
KaRMI: design
Clean
Interfaces
between
Design
Layers
Technology
objects hide
hardware
8
Benchmark Results
9
Conclusion & Future
• With UKA Serialization and KaRMI, high-performance
networks can be used for Grande Applications
• More information and download:
http://wwwipd.ira.uka.de/JavaParty/
• 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.
10