Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster...

10
Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and FZI Forschungszentrum Informatik Germany

Transcript of Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster...

Page 1: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

Forschungszentrum Informatik, Karlsruhe

Michael Philippsen

and the JavaParty Team

Faster Serialization and Faster RMI for Java

Universität Karlsruhe andFZI Forschungszentrum Informatik

Germany

Page 2: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

2Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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

Page 3: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

3Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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

Page 4: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

4Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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

Page 5: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

5Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

UKA Serialization: benchmarks

Steps of improvement:

Page 6: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

6Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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): 80s on Digital Alphas connected by Myrinet

• Minor (?) incompatibilities:

– no sockets & ports at user-level

– no support of undocumented RMI classes

• Some impact on Sun

Page 7: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

7Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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

Page 8: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

8Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

KaRMI: design

Clean

Interfaces

between

Design

Layers

Technology

objects hide

hardware

Page 9: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

9Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

Benchmark Results

Page 10: Forschungszentrum Informatik, Karlsruhe Michael Philippsen and the JavaParty Team Faster Serialization and Faster RMI for Java Universität Karlsruhe and.

10Michael Philippsen Universität Karlsruhe Faster Serialization and faster RMI

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 Sunto work on performance aspects.