An Approach to Buffer Management in Java HPC Messaging - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

An Approach to Buffer Management in Java HPC Messaging

Description:

An Approach to Buffer Management in Java HPC Messaging ... A version was used in 'Millenium Simulation' that evolves 10^10 dark matter ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 26
Provided by: mpjex
Category:

less

Transcript and Presenter's Notes

Title: An Approach to Buffer Management in Java HPC Messaging


1
An Approach to Buffer Management in Java HPC
Messaging
  • Mark Baker, Bryan Carpenter, and Aamir Shafi
  • Distributed Systems Group
  • http//dsg.port.ac.uk

2
Presentation outline
  • Introduction,
  • The Buffering Layer in MPJ Express,
  • Performance Evaluation,
  • A Use Case from Computational Cosmology,
  • Conclusions.

3
Introduction
  • Traditional language based approach to high
    level parallel programming
  • HPF, UPC, Co-Array Fortran etc.
  • Recently practical parallel programming has
    focused on commodity languages supplemented by
    libraries like MPI
  • C, C, Fortran ,
  • Cost-effective.
  • Therefore, practical approach to raise the
    level of parallel programming
  • Use an advanced commodity language.

4
Introduction
  • There are several arguments for using Java for
    scientific computing, including
  • Portability,
  • Compile-time and runtime safety,
  • Built-in multi-threading,
  • Rapid development,
  • Built-in libraries,
  • Performance via JIT-compilers.
  • MPI was finalized in June 1994 as a standard
    message passing API for technical parallel
    computing
  • Java Grande Message Passing Workgroup defined
    Java bindings in 98.

5
Introduction
  • MPJ Express is a high quality implementation of a
    Java messaging system, based on Java bindings
  • Released September 2005,
  • Thread-safe communication devices for TCP and
    Myrinet,
  • Implements derived datatypes, communicators,
    and virtual topologies,
  • Runtime system for portable bootstrapping,
  • Web http//dsg.port.ac.uk/projects/mpj

6
Introduction Java NIO
  • Java New I/O
  • Non-blocking communication,
  • Introduces direct and indirect ByteBuffers
  • Direct byte buffer reside in native OS memory,
    unlike normal Java objects,
  • The creation of direct byte buffer is costly but
    provide faster I/O.

7
Introduction The Buffering Layer in MPJ Express
  • MPJ Express requires a buffering layer
  • To use Java NIO
  • It is possible to read and write data to and from
    byte buffers onto the wire.
  • To use proprietary networks like Myrinet
    efficiently
  • Direct byte buffers have memory pointers that can
    be used for Direct Memory Access (DMA) transfers,
  • Avoid JNI overheads
  • No data-copying between JVM and native OS memory.
  • It incurs an additional copying overhead though.

8
Presentation outline
  • Introduction,
  • The Buffering Layer in MPJ Express,
  • Performance Evaluation,
  • A Use Case from Computational Cosmology,
  • Conclusions.

9
Buffering Layer
  • An extendable buffering layer (mpjbuf)
  • Supports higher and lower levels of MPJ Express,
  • Various implementations based on actual storage
    medium
  • Direct or indirect ByteBuffers,
  • Arrays,
  • Native C memory.
  • An mpjbuf buffer object consists of
  • A static buffer to store primitive datatypes,
  • A dynamic buffer to store serialized Java
    objects.
  • Creating ByteBuffers on the fly is costly
  • Memory management is based on Knuths buddy
    algorithm,
  • Two implementations
  • Buddy1 - store offset and smaller memory
    footprint,
  • Buddy2 - store objects and bigger memory
    footprint.

10
Allocation Time Comparison
11
Faster I/O with direct ByteBuffers
12
Presentation outline
  • Introduction,
  • The Buffering Layer in MPJ Express,
  • Performance Evaluation
  • MPJ Express compared to MPICH and mpiJava on
    Fast Ethernet and Myrinet,
  • A Use Case from Computational Cosmology,
  • Conclusions.

13
Transfer Time on Fast Ethernet
14
Throughput on Fast Ethernet
15
Transfer Time on Myrinet
16
Throughput on Myrinet
17
Presentation outline
  • Introduction,
  • The Buffering Layer in MPJ Express,
  • Performance Evaluation,
  • A Use Case from Computational Cosmology,
  • Conclusions.

18
Gadget-2
  • An experiment to understand Javas performance.
  • Gadget-2 is a massively parallel structure
    formation cosmological simulations that is
    written in C
  • Simulates the evolution of large systems under
    the influence of gravitational and hydrodynamic
    forces,
  • A version was used in Millenium Simulation that
    evolves 1010 dark matter particles from the
    early Universe to the current day
  • Executed on 512 nodes using a Terabyte of
    distributed memory,
  • Used 350,000 CPU hours over 28 days of elapsed
    time.
  • Uses Barnes-hut tree algorithm for calculating
    gravitational forces,
  • Domain decomposition based on Peano-Hilbert space
    filling curve.
  • We produced a Java version of Gadget-2 using MPJ
    Express for messaging.
  • Benchmarking comparison for Colliding Galaxies.

19
Execution Time on Fast Ethernet
20
Execution Time on Myrinet
21
Tree walk time comparison
22
Presentation outline
  • Introduction,
  • The Buffering Layer in MPJ Express,
  • Performance Evaluation,
  • A Use Case from Computational Cosmology,
  • Conclusions.

23
Summary
  • MPJ Express is becoming a production-quality Java
    messaging system
  • Communication devices for TCP and Myrinet.
  • MPJ Express relies on an intermediate buffering
    layer
  • Avoid JNI overheads,
  • Possible to use direct ByteBuffers,
  • Memory management using Knuths buddy algorithm.
  • Java version of Gadget-2
  • A use-case from computational cosmology.

24
Conclusions
  • We have shown that Java has the potential to be a
    good HPC language.
  • The additional overhead of copying can be
    avoided by extending the MPJ API
  • Support for sending from and receiving to
    ByteBuffers.
  • Future Work
  • Exploit thread-safety of MPJ Express by using
    OpenMP parallelism,
  • Next release with Myrinet device in the third
    quarter of 2006.

25
Questions
?
Write a Comment
User Comments (0)
About PowerShow.com