An application's performance depends on a combination of hardware and software factors.
Sun Studio C, C++, and Fortran compilers offer a rich set of compile-time options for specifying target hardware and advanced optimization techniques.
But knowing which options to pick for a given application can be tricky.
You can learn about various performance analysis and optimization techniques and tools from many articles and books on the subject.
This topic page highlights a number of them.
Technical Articles on Performance Optimization
Memory Profiling With MPI Analyzer
This note explores memory profiling as discussed in an email thread and shows an example of how to distinguish between heavy-user program memory
allocation versus memory allocations within the MPI implementation due to resource congestion.
Profiling MPI Applications
This article details the profiling of Message Passing Interface (MPI) applications with the Sun Studio Performance Tools. Get an overview of MPI performance data and learn how to compile and launch your application for performance profiling.
Prefetching Pragmas and Intrinsics
Explicit data prefetching pragmas and intrinsics for the x86
platform and additional pragmas and intrinscs for the SPARC platform
are now available in Sun Studio 12 compilers. Prefetch instructions can increase the speed of an application
substantially by bringing data into cache so that it is available when
the processor needs it. This benefits performance because today's
processors are so fast that it is difficult to bring data into them
quickly enough to keep them busy, even with hardware prefetching and
multiple levels of data cache.
When porting Fortran source, the Fortran 95 generic interface can be
used to allow the source code to remain virtually unchanged and yet
facilitate the use of the ILP-32, LP-64, and ILP-64 programming models.
Getting the Best AMD64 Performance With Sun Studio Compilers
Performance is a factor of both hardware and software. To extract the
maximum performance from the new AMD-64 based systems on your critical
C/C++ and Fortran applications, choose the best compilers. Then use
compiler options to take advantage of the Opteron system features to
maximize performance. This article will show you how.
The VIS instruction set includes a number of instructions that can
be used to handle several items of data at the same time. These are
called SIMD (Single Instruction Multiple Data) instructions. The VIS
instructions work on data held in floating point registers. The
advantage of using VIS instructions is that an operation can be applied
to different items of data in parallel; meaning that it takes the same
time to compute eight 1 byte results as it does to calculate one 8-byte
results. In theory this means that code that uses VIS instructions can
be many times faster than code without them.
The Binary Optimizer is a static SPARC optimizer that accepts as
input a binary and creates an optimized binary as the output. We define
a binary as either an executable or a shared object. The availability
of the original source code is not a pre-requisite for using this tool.
It can optimize binaries irrespective of the source language used (C,
C++ or FORTRAN). It can also optimize mixed source language binaries.
Users wanting the best performance from CPU-intensive codes may
wish to explore the use of additional libraries and advanced compiler
options that control individual compiler components.
How to get the best performance from an UltraSPARC or x86/AMD64
(x64) processor running on the latest Solaris systems by compiling with
the best set of compiler options and the latest compilers? Here are
suggestions of things you should try, but before you release the final
version of your program, you should understand exactly what you have
asked the compiler to do.
Inline templates are a mechanism for directly inserting assembly
code into an executable. Typically, this approach is used to obtain the
best performance for a given function, or to implement an algorithm in
a specific way.
Additional Resources on Optimization
Books
Solaris Application Programming
by Darryl Gove Solaris Application Programming is a comprehensive guide to optimizing the performance of applications running in your Solaris environment.
From the fundamentals of system performance to using analysis and optimization tools to their fullest,
this wide-ranging resource shows developers and software architects how to get the most from Solaris systems and applications.
The Developer's Edge
edited by Darryl Gove The Developer's Edge focuses on articles on native programming language issues, performance and improving performance,
specific features of the x86 and SPARC processors, and tools that are available in the Solaris OS.
Using OpenMP
by Chapman, Jost, and van der Pas
With multicore computer use increasing, the need for a comprehensive introduction and overview of the standard interface is clear.
Using OpenMP provides an essential reference not only for students at both undergraduate and graduate levels
but also for professionals who intend to parallelize existing codes or develop new parallel programs for shared memory
computer architectures.
Techniques
for Optimizing Applications: High Performance Computing
by Rajat P. Garg and Ilya Sharapov
This Sun Blueprints Series book is a practical guide to performance
optimization of computationally intensive programs on Sun
UltraSPARC
platforms. It is primarily intended for developers of technical or
high performance computing (HPC) applications for the Solaris operating
environment.
Videos
Here are two presentations by Ruud van der Pas of the Scalable Systems Group at Sun Microsystems. These were given at RWTH Aachen University, Germany, in March 2006 as part of the
Sun HPC Workshop.