10
POWER7 and Optimization and Tuning Guide
Java options
Many Java applications are performance sensitive to the configuration of the Java heap and
garbage collection (GC). Experimentation with different heap sizes and GC policies is an
important first optimization step. For generational GC, consider using the options that specify
the split between nursery space (also known as the
new
or
young
space) and tenured space
(also known as the
old
space). Most Java applications have modest requirements for
long-lived objects in the tenured space, but frequently allocate new objects with a short life
span in the nursery space.
If 64-bit Java is used, use the
-Xcompressedrefs
option.
By default, recent releases of Java use 64 KB medium pages for the Java heap, which is the
equivalent of explicitly specifying the
-Xlp64k
option. If older releases of Java are used, we
strongly encourage using the
-Xlp64k
option. Otherwise, those releases default to using 4 KB
pages. Often, there is some additional performance improvement that is seen in using larger
16 MB large pages by using the
-Xlp16m
option. However, using 16 MB pages normally
requires explicit configuration by the administrator of the AIX or Linux operating system to
reserve a portion of the memory to be used exclusively for large pages. (For more
information, see 7.3.2, “Configuring large pages for Java heap and code cache” on
page 128.) As such, the medium pages are a better choice for general use, and the large
pages can be considered for performance critical applications. The new Dynamic System
Optimizer (DSO) facility in AIX (see 4.2, “AIX Active System Optimizer and Dynamic System
Optimizer” on page 84) autonomously takes advantage of 16 MB pages without administrator
configuration. This facility might be appropriate for cases where a very large Java heap is
being used.
On Power Systems, the
-Xcodecache
option often delivers a small improvement in
performance, especially in a large Java application. This option specifies the size of each
code cache that is allocated by the JIT compiler for the binary code that is generated for Java
methods. Ideally, all of the compiled Java method binary code fits into a single code cache,
eliminating the small penalty that occurs when one Java method calls another method when
the binary code for the two methods is in different code caches. To use this option, determine
how much code space is being used, and then set the size of the option correctly. The
maximum size of each code cache that is allocated is 32 MB, so the largest value that can be
used for this option is
-Xcodecache32m
. For more information, see 7.3.5, “JIT code cache” on
page 129.
The JIT compiler automatically uses an appropriate optimization level when it compiles Java
methods, and recent Java releases automatically fully utilize all of the new features of the
target POWER7 or processor of the system an application is running on.
For more information about Java performance, see Chapter 7, “Java” on page 125.
Optimized libraries
Optimized libraries are important for application performance. This section covers some
considerations that are related to standard libraries for AIX or Linux, libraries for Java, or
specialized mathematical subroutine libraries that are available for the Power Architecture.
AIX malloc
The AIX operating system offers various memory allocation packages (the standard
malloc()
and related routines in the C library). The default package offers good space efficiency and
performance for single-threaded applications, but it is not a good choice for the scalability of
multi-threaded applications. Choosing the correct malloc package on AIX is important for
performance. Even Java applications can make extensive use of malloc through JNI code or
internally in the Java Runtime Environment (JRE).
Содержание Power System POWER7 Series
Страница 2: ......
Страница 36: ...20 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 70: ...54 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 112: ...96 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 140: ...124 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 162: ...146 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 170: ...154 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 222: ...POWER7 and POWER7 Optimization and Tuning Guide POWER7 and POWER7 Optimization and Tuning Guide...
Страница 223: ......