ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/tuning.htm

127 lines
8.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Tune Java program performance with IBM Developer Kit for Java" />
<meta name="abstract" content="You should take several aspects of Java application performance into consideration when building a Java application for your iSeries server." />
<meta name="description" content="You should take several aspects of Java application performance into consideration when building a Java application for your iSeries server." />
<meta name="DC.Relation" scheme="URI" content="../books/sc415340.pdf" />
<meta name="DC.Relation" scheme="URI" content="whatitis.htm" />
<meta name="DC.Relation" scheme="URI" content="evenperf.htm" />
<meta name="DC.Relation" scheme="URI" content="runtperf.htm" />
<meta name="DC.Relation" scheme="URI" content="gc.htm" />
<meta name="DC.Relation" scheme="URI" content="jnmiperf.htm" />
<meta name="DC.Relation" scheme="URI" content="jmiperf.htm" />
<meta name="DC.Relation" scheme="URI" content="excperf.htm" />
<meta name="DC.Relation" scheme="URI" content="callperf.htm" />
<meta name="DC.Relation" scheme="URI" content="profperf.htm" />
<meta name="DC.Relation" scheme="URI" content="colpdc.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="tuning" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Tune Java program performance with IBM Developer Kit for Java</title>
</head>
<body id="tuning"><a name="tuning"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Tune Java program performance with IBM<sup>®</sup> Developer Kit for Java</h1>
<div><p>You should take several aspects of Java™ application performance into consideration
when building a Java application for your iSeries™ server. </p>
<p>Here are some links to details and hints on how you can get better performance:</p>
<ul><li><a href="runtperf.htm">Improve performance of your Java code</a> by
using the Create Java Program (CRTJVAPGM) command, the Just-In-Time compiler,
or Using cache for user class loaders.</li>
<li>Change your optimization levels to achieve the best <a href="tranperf.htm">static
compilation performance</a>.</li>
<li>Carefully set your values for optimal <a href="gcperf.htm">garbage
collection performance</a>.</li>
<li>Only use <a href="jnmiperf.htm">native methods</a> to start system
functions that are relatively long running and are not available directly
in Java.</li>
<li>Use the <samp class="codeph">javac</samp> -o option at compilation time to perform <a href="jmiperf.htm">method inlining</a> and significantly improve your
method call performance.</li>
<li>Use <a href="excperf.htm">Java exceptions</a> in cases that are
not the normal flow through your application.</li>
</ul>
<p>Use these tools with the Performance Explorer (PEX) to locate performance
problems in your Java programs:</p>
<ul><li>You can collect <a href="evenperf.htm#evenperf">Java event trace performance tools</a> using the iSeries Java virtual
machine.</li>
<li>To determine the time that is spent in each Java method, use <a href="callperf.htm">Java call
traces</a>.</li>
<li><a href="profperf.htm">Java profiling</a> locates the relative
amount of CPU time that is spent in each Java method and all system functions that
are in use by your Java program.</li>
<li>Use the <a href="pdc.htm">Java Performance Data Collector</a> to
provide profile information about the programs that run on the iSeries server.</li>
</ul>
<p>Any job session can start and end PEX. Normally, the data that is collected
is system wide and pertains to all jobs on the system, including your Java programs.
At times, it may be necessary to start and stop the performance collection
from inside a Java application. This reduces the collection time and
may reduce the large volume of data that is usually produced by a call or
return trace. PEX cannot run from within a Java thread. To start and stop a collection,
you need to write a native method that communicates to an independent job
though a queue or shared memory. Then, the second job starts and stops the
collection at the appropriate time.</p>
<p>In addition to application-level performance data, you can use existing iSeries system
level performance tools. These tools report statistics on a Java thread
basis.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="evenperf.htm">Java event trace performance tools</a></strong><br />
The iSeries Java virtual
machine enables the trace of certain Java events.</li>
<li class="ulchildlink"><strong><a href="runtperf.htm">Java performance considerations</a></strong><br />
Understanding the following considerations can help you improve
the performance of your Java applications.</li>
<li class="ulchildlink"><strong><a href="gc.htm">Java garbage collection</a></strong><br />
Garbage collection is the process of freeing storage that is used by objects that are no longer referred to by a program. With garbage collection, programmers no longer have to write error prone code to explicitly "free" or "delete" their objects. This code frequently results in "memory leak" program errors. The garbage collector automatically detects an object or group of objects that the user program can no longer reach. It does this because there are no references to that object in any program structure. Once the object has been collected, you can allocate the space for other uses.</li>
<li class="ulchildlink"><strong><a href="jnmiperf.htm">Java Native Method Invocation performance considerations</a></strong><br />
Native method invocation on an iSeries server may not perform as well
as native method invocation on other platforms. </li>
<li class="ulchildlink"><strong><a href="jmiperf.htm">Java method inlining performance considerations</a></strong><br />
Method inlining can significantly improve method call performance. Any method that is final is a potential candidate for inlining.</li>
<li class="ulchildlink"><strong><a href="excperf.htm">Java exception performance considerations</a></strong><br />
The iSeries exception
architecture allows versatile interrupt and retry capabilities. It also allows
mixed language interaction. Throwing Java exceptions on an iSeries server
may be more expensive than on other platforms. This should not affect overall
application performance unless Java exceptions are routinely used in the
normal application path.</li>
<li class="ulchildlink"><strong><a href="callperf.htm">Java call trace performance tools</a></strong><br />
Java method call traces provide significant performance
information about the time that is spent in each Java method. </li>
<li class="ulchildlink"><strong><a href="profperf.htm">Java profiling performance tools</a></strong><br />
System wide central processing unit (CPU) profiling calculates
the relative amount of CPU time that is spent in each Java method
and all system functions in use by your Java program.</li>
<li class="ulchildlink"><strong><a href="colpdc.htm">Collect Java performance data</a></strong><br />
To collect Java performance data on an iSeries server,
follow these steps.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="whatitis.htm" title="Java compatibleIBM Developer Kit for Java is optimized for use in an iSeries server environment. It uses the compatibility of Java programming and user interfaces, so you can develop your own applications for the iSeries server.">IBM Developer Kit for Java</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../books/sc415340.pdf" target="_blank" title="Link to PDF This manual contains examples of PEX reports.">Performance
Tools for iSeries, SC41-5340</a></div>
</div>
</div>
</body>
</html>