180 likes | 196 Views
MPJ: A Java-based Parallel Computing System. Aamir Shafi Distributed Systems Group University of Portsmouth. Presentation Outline. Introduction, Design and Implementation of MPJ, Preliminary Performance Evaluation, Conclusions. Introduction (1) . Serial Computation:
E N D
MPJ: A Java-based Parallel Computing System Aamir Shafi Distributed Systems Group University of Portsmouth
Presentation Outline • Introduction, • Design and Implementation of MPJ, • Preliminary Performance Evaluation, • Conclusions.
Introduction (1) • Serial Computation: • Using ‘a’ single processor to solve a problem: • Sequential - the CPU executes instructions ‘one after the another’, • Parallel Computation: • Using multiple processors to solve a problem: • Each processors executes different instructions simultaneously, • Processors collaborate by passing messages via: • System bus (I.e. on a Symmetric Multi-Processors), • Interconnect (i.e. on a Cluster), • Why Parallel Computing? • To achieve application speed-up (lesser execution time), • To solve large-scale problems. • Message Passing Interface: • A software layer, used for inter-processor communications between peer processes.
Introduction (2) • In order to standardise the message passing software layer, the Message Passing Interface (MPI) was introduced in June 1994: • Language bindings for C, C++, and Fortran, • Java is becoming a popular platform for scientific computing: • ‘Write once, run anywhere’ philosophy, • Built-in support for threads, networking, synchronization, and security, • Easy to use graphical packages, • Improved performance - Just In Time (JIT) compilers: • Comms performance is comparable to C on Fast Ethernet, • As a result, a Java binding was proposed in 98’ by the Java Grande Forum: • Not part of the official MPI standards effort.
Introduction (3) • Previous Efforts: • “Either” of these two approaches can be used, • Wrappers to existing MPI C libraries: • High Performance, • Pure Java: • Portability, • Aims of this project: • Develop a reference implementation of the MPI standard in Java, • Based on the ideology that there is no ‘one size fits all’ approach for Java messaging, • Application users can choose between high performance or portability, • Options for various communication protocols: • TCP (using Java New I/O package), • Shared Memory, • Myrinet etc., • Allows use of wrappers to native MPI implementations.
Presentation Outline • Introduction, • Design and Implementation, • Preliminary Performance Evaluation, • Conclusions.
Design • Aims: • Support swapping various communication devices, • Based on the idea of UNIX device drivers, • Two device levels: • The MPJ Device level (mpjdev): • Makes it possible to provide an interface to native MPI libraries, • The xdev Device level (xdev): • Provides interface to implement drivers for various communication protocols, • TCP (using Java New I/O package), • Shared Memory, • Myrinet etc.
Implementation • MPJ complies with the functionality of MPI-1.2: • Point to point communications, • Collective communications, • Groups, communicators, and contexts, • Derived datatypes: • Buffering API, • Runtime infrastructure: • Allows bootstrapping MPJ processes, • MPJ Daemon can be installed as OS service, • Communication protocols: • Java NIO device, • GM 2.x.x device (Myrinet), • Shared memory device (using Threads API).
Presentation Outline • Introduction, • Design and Implementation, • Preliminary Performance Evaluation, • Conclusions.
Preliminary Performance Evaluation • Point-to-point (connected by Fast Ethernet): • mpiJava 1.2.5 (using MPICH 1.2.5), • MPJ (using Java NIO), • MPICH (1.2.5) (using ch_p4), • LAM/MPI (7.0.9) (using TCP RPI), • Transfer time and throughput graphs, • Analysis.
Transfer Time Comparison MPJ: ~250 microseconds (latency) mpiJava, LAM/MPI, MPICH: ~125 microseconds (latency)
Throughput Comparison MPJ: ~81 Mbps mpiJava: ~84 Mbps LAM/MPI: ~90 Mbps MPICH: ~88 Mbps
Analysis • General behaviour is similar to other MPI implementations, • Optimisation areas: • Latency for small messages: • Currently control message and data is written in two separate SocketChannelwrite operations, • Large messages: • Maintaining pool of buffers, • Understand the anamoly at 16 Mbyte datapoint.
Presentation Outline • Introduction,. • Design and Implementation, • Preliminary Performance Evaluation, • Conclusions.
Summary • A key issue for Java messaging is not debating the use of pure Java or the JNI approach: • But, providing a flexible mechanism to swap various communication protocols. • MPJ has a pluggable architecture: • We have implemented devices for: • TCP (using Java NIO), • Myrinet (using GM 2.x.x), • Shared memory communications (using Threads API), • The MPJ runtime infrastructure allows bootstrapping MPJ processes across various platforms.
Conclusions • MPJ is the second generation ‘MPI for Java’, • Current Status: • Unit testing, • Optimisation, • First release by the end of June05, • Java NIO device, • Arguably, the first “full” MPI library for Java providing a pure Java implementation. • Future Work: • Define and implement Java bindings for MPI-2 standard.