MVAPICH2 software, supporting the latest MPI 3.1 standard, delivers best performance, scalability and fault tolerance for high-end computing systems and servers using InfiniBand, 10/40 GigE/iWARP and RoCE (V1 and V2) networking technologies. MVAPICH2-X software library provides support for hybrid MPI+PGAS (UPC, OpenSHMEM, CAF, and UPC++) programming models with unified communication runtime. MVAPICH2 and MVAPICH2-X software libraries (http://mvapich.cse.ohio-state.edu) are powering several supercomputers in the XSEDE program including Gordon, Comet, Lonestar4, and Stampede. These software libraries are being used by more than 2,550 organizations world-wide in 79 countries to extract the potential of these emerging networking technologies for modern systems. As of March '16, more than 358,000 downloads have taken place from this project's site. These software libraries are also powering several supercomputers in the TOP 500 list like Stampede, Tsubame 2.5 and Pleiades. A large number of XSEDE users are using these libraries on a daily-basis to run their MPI and PGAS applications. However, many of these users and the corresponding system administrators are not fully aware of all features, optimizations and tuning techniques associated with these libraries. This tutorial is aimed to address these concerns and provide a set of concrete guidelines to XSEDE users to boost performance of their applications. Further, as accelerators such as GPUs and MICs are commonly available on XSEDE resources, it is becoming an increasingly challenging task to extract best performance and scalability for user applications on such systems. We will also present tuning and optimization techniques for such systems. We will start with an overview of the MVAPICH2 libraries and their features. Next, we will focus on installation guidelines, runtime optimizations and tuning flexibility in-depth. An overview of configuration and debugging support in MVAPICH2 libraries will be presented. Support for GPUs and MIC enabled systems will be presented. The impact on performance of the various features and optimization techniques will be discussed in an integrated fashion. `Best Practices' for a set of common XSEDE applications will be presented. Advanced optimization and tuning of MPI applications using the new MPI-T feature (as defined by the MPI-3 standard) in MVAPICH2 will also be discussed. A set of case studies related to application redesign will be presented to take advantage of hybrid MPI+PGAS programming models. Finally, the use of MVAPICH2-EA library, aimed to reducing the energy footprint of HPC applications, will be explained.